My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::Logger Class Reference

Public Member Functions

virtual ~Logger ()
 

Static Public Member Functions

static void log (std::string message, bool isError)
 
static void log (LogStream *ls)
 
static void dispatch (std::string message, bool isError)
 
static void dispatch (LogStream *ls)
 
static void report (std::string message, bool isError)
 
static void report (LogStream *ls)
 
static void installLogHandler (LOG_HANDLER_FN(*logHandler))
 
static void installErrHandler (LOG_HANDLER_FN(*errHandler))
 
static void setPrefix (std::string prefix)
 
static void setLogFilePrefix (const std::string &prefix)
 
static void setLogFileDirectory (const std::string &dir)
 
static void openLogFile ()
 
static void closeLogFile ()
 
static void installStdoutPrintFn (LOG_HANDLER_FN(*stdoutPrintFn))
 
static void installStderrPrintFn (LOG_HANDLER_FN(*stderrPrintFn))
 
static void defaultStdoutPrintFn (std::string str)
 
static void defaultStderrPrintFn (std::string str)
 
static void printToStdout (std::string message)
 
static void printToStderr (std::string message)
 

Constructor & Destructor Documentation

Logger::~Logger ( )
virtual

Destructor.

....................................................................... Destructor.

Member Function Documentation

void Logger::closeLogFile ( )
static

Close the logfile

....................................................................... Open the logfile

static void gcp::util::Logger::dispatch ( std::string  message,
bool  isError 
)
static

Dispatch a message to handlers

void Logger::dispatch ( LogStream ls)
static

....................................................................... Dispatch a message (call any handlers set to handle this message type)

void Logger::installErrHandler ( LOG_HANDLER_FN *  errHandler)
static

Install an error-message handler.

....................................................................... Install an error-message handler.

void Logger::installLogHandler ( LOG_HANDLER_FN *  logHandler)
static

Install a log-message handler.

....................................................................... Install a log-message handler.

void Logger::installStderrPrintFn ( LOG_HANDLER_FN *  stderrPrintFn)
static

....................................................................... Install a default stderr print fn

void Logger::installStdoutPrintFn ( LOG_HANDLER_FN *  stdoutPrintFn)
static

....................................................................... Install a default stdout print fn

static void gcp::util::Logger::log ( std::string  message,
bool  isError 
)
static

Log a message to the logfile

void Logger::log ( LogStream ls)
static

....................................................................... Log a message (write to a logfile, if any)

void Logger::openLogFile ( )
static

Open the logfile

....................................................................... Open the logfile

void Logger::printToStderr ( std::string  message)
static

....................................................................... Print a message to stderr. If a user-defined print function has been installed, use that, else use the default print method

void Logger::printToStdout ( std::string  message)
static

....................................................................... Print a message to stdout. If a user-defined print function has been installed, use that, else use the default print method

static void gcp::util::Logger::report ( std::string  message,
bool  isError 
)
static

Report a message to both handlers and logfile

void Logger::report ( LogStream ls)
static

....................................................................... Report a message (equivalent to log + dispatch)

void Logger::setLogFileDirectory ( const std::string &  dir)
static

Set the directory for a logfile

....................................................................... Set the directory for a logfile

void Logger::setLogFilePrefix ( const std::string &  prefix)
static

Set the prefix for a logfile

....................................................................... Set the prefix for a logfile

void Logger::setPrefix ( std::string  prefix)
static

Set a string to be prepended to every message we log.

....................................................................... Set a string to be prepended to every message we log


The documentation for this class was generated from the following files: