Skip to content
Snippets Groups Projects
Commit d9d13764 authored by James R.'s avatar James R.
Browse files

-logfile to let the user change the log file name

parent 1e136040
No related branches found
No related tags found
2 merge requests!734Rebase Keycodes only branch.,!567haha log files
......@@ -133,15 +133,19 @@ int main(int argc, char **argv)
{
time_t my_time;
struct tm * timeinfo;
char buf[26];
const char *format;
logdir = D_Home();
my_time = time(NULL);
timeinfo = localtime(&my_time);
strftime(buf, 26, "%Y-%m-%d %H-%M-%S", timeinfo);
strcpy(logfile, va("log-%s.txt", buf));
if (M_CheckParm("-logfile") && M_IsNextParm())
format = M_GetNextParm();
else
format = "log-%Y-%m-%d %H-%M-%S.txt";
strftime(logfile, sizeof logfile, format, timeinfo);
#ifdef DEFAULTDIR
if (logdir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment