- added an errorlog option.
This cuts down on as much message noise as possible, outputs everything to a file specified as a parameter and then quits immediately, allowing this to run from a batch that's supposed to check a larger list of files for errors. Multiple outputs get appended if the file already exists.
This commit is contained in:
parent
6c92525fcd
commit
4d2a52418f
22 changed files with 96 additions and 70 deletions
|
|
@ -456,9 +456,9 @@ CCMD (exec)
|
|||
}
|
||||
}
|
||||
|
||||
void execLogfile(const char *fn)
|
||||
void execLogfile(const char *fn, bool append)
|
||||
{
|
||||
if ((Logfile = fopen(fn, "w")))
|
||||
if ((Logfile = fopen(fn, append? "a" : "w")))
|
||||
{
|
||||
const char *timestr = myasctime();
|
||||
Printf("Log started: %s\n", timestr);
|
||||
|
|
@ -482,7 +482,7 @@ CCMD (logfile)
|
|||
|
||||
if (argv.argc() >= 2)
|
||||
{
|
||||
execLogfile(argv[1]);
|
||||
execLogfile(argv[1], argv.argc() >=3? !!argv[2]:false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue