![]() |
Dragonfly 2.2
A text-based game engine
|
Public Member Functions | |
| int | startUp (bool flush=false) |
| Start up the LogManager (open logfile "dragonfly.log"). | |
| void | shutDown () |
| Shut down the LogManager (close logfile). | |
| int | writeLog (const char *fmt,...) |
| Write to logfile. | |
Static Public Member Functions | |
| static LogManager & | getInstance () |
| Get the one and only instance of the LogManager. | |
Protected Attributes | |
| bool | do_flush |
| True if fflush after each write. | |
| FILE * | fp |
| Pointer to log file. | |
Private Member Functions | |
| LogManager () | |
| Private since a singleton. | |
| LogManager (LogManager const &) | |
| Don't allow copy. | |
| void | operator= (LogManager const &) |
| Don't allow assignment. | |
| int LogManager::startUp | ( | bool | flush = false | ) |
Start up the LogManager (open logfile "dragonfly.log").
if flush is true, then call fflush() afer each write.
| int LogManager::writeLog | ( | const char * | fmt, |
| ... | |||
| ) |
Write to logfile.
Supports printf() formatting of strings. Return number of bytes written, -1 if error.
1.7.3