Claypool

Courses

Publications

Students

Projects

Service

Downloads

Misc


Dragonfly: LogManager Class Reference
Dragonfly 2.2
A text-based game engine
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions

LogManager Class Reference

Inheritance diagram for LogManager:
Manager

List of all members.

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 LogManagergetInstance ()
 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.

Member Function Documentation

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.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Friends