Qhimm.com Forums
Project forums => Q-Gears => Topic started by: G on 2007-02-24 05:34:35
-
I modified class Logger:
void Log(MessageType logType,const char* logText, ...);
MessageType is:
enum MessageType {LOGGER_INFO, LOGGER_WARNING, LOGGER_ERROR, LOGGER_OTHER};
Message types are in format X-Window system used:
"(II)" - informational messages
"(WW)" - warning messages
"(EE)" - error messages
"(--)" - other messages
I have added also command line switches:
Usage: ./q-gears-ffvii [options]
Basic options:
-h, --help
display this help and exit
-v, --verbose
set logging to console
-d, --debug
set logging to file
If we want to duplicate log messages in game.log to console - we start q-gears-ffvii -v
Added Akari's FF Tactics code to Linux makefiles.
Found out, that on my 64-bit Linux system there is a white screen in place of q-gears logo (I thought, that it's good, but yesterday I compiled q-gears on my notebook :|)
-
To add some sanity, we also need to have some assertion checks so that if there is a fatal error, q-gears dies gracefully
-
To add some sanity, we also need to have some assertion checks so that if there is a fatal error, q-gears dies gracefully
I thought about it, but I don't know, where to add it: adding to Logger class is a bad idea, task of Logger is logging...
When file isn't found, class File produce only warning - we can die there, but there can be other situations, where file not found isn't critical problem
-
Any Fatal or Critical error should be directed to the console and if possible to the logger also. It should not depend on the logger class itself however.
Fatal Exceptions would be things that normally are segfaults caused by things such as 'no read or write access' to the file system.
Critical Exceptions are things that will prevent the game from running but won't cause the program to segfault. (IE GLX is missing etc.)
Currently the logger is no good, IF you can't write a log file (and the thing segfaults as a consequence). Hence you should spew out a message to the console and die gracefully.
Simple terms, you can't rely on the logger for anything worse than Errors (IE Critical and Fatal) to work. The console must be abused for this. So maybe we need an exception message class to send information to the console?
Cyb