ESP  0.1
The Example-based Sensor Predictions (ESP) system tries to bring machine learning to the maker community.
ofConsoleFileLoggerChannel Class Reference

A logger channel that logs its messages to the console and a log file. More...

#include <ofConsoleFileLoggerChannel.h>

Inheritance diagram for ofConsoleFileLoggerChannel:

Public Member Functions

 ofConsoleFileLoggerChannel ()
 Create an ofConsoleFileLoggerChannel. More...
 
 ofConsoleFileLoggerChannel (const string &path, bool append)
 Create an ofConsoleFileLoggerChannel with parameters. More...
 
void setFile (const string &path, bool append=false)
 Set the log file. More...
 
void log (ofLogLevel level, const string &module, const string &message)
 
void log (ofLogLevel level, const string &module, const char *format,...) OF_PRINTF_ATTR(4
 
void void log (ofLogLevel level, const string &module, const char *format, va_list args)
 
void close ()
 CLose the log file. More...
 
void setConsoleLogLevel (ofLogLevel level)
 Set the minimum log level for the console log. More...
 
void setFileLogLevel (ofLogLevel level)
 Set the minimum log level for the file log. More...
 

Detailed Description

A logger channel that logs its messages to the console and a log file.

Constructor & Destructor Documentation

ofConsoleFileLoggerChannel::ofConsoleFileLoggerChannel ( )
ofConsoleFileLoggerChannel::ofConsoleFileLoggerChannel ( const string &  path,
bool  append 
)

Create an ofConsoleFileLoggerChannel with parameters.

Parameters
pathThe file path for the log file.
appendTrue if the log data should be added to an existing file.

Member Function Documentation

void ofConsoleFileLoggerChannel::close ( )

CLose the log file.

void ofConsoleFileLoggerChannel::log ( ofLogLevel  level,
const string &  module,
const string &  message 
)
void ofConsoleFileLoggerChannel::log ( ofLogLevel  level,
const string &  module,
const char *  format,
  ... 
)
void ofConsoleFileLoggerChannel::log ( ofLogLevel  level,
const string &  module,
const char *  format,
va_list  args 
)
void ofConsoleFileLoggerChannel::setConsoleLogLevel ( ofLogLevel  level)
inline

Set the minimum log level for the console log.

Note that this is additional level of filtering beyond that provided by the global ofSetLogLevel(). Anything below that log level will not be logged, regardless of the value of the console-specific log level.

Parameters
levelthe log level to apply to the console log (defaults to OF_LOG_VERBOSE)
void ofConsoleFileLoggerChannel::setFile ( const string &  path,
bool  append = false 
)

Set the log file.

Parameters
pathThe file path for the log file.
appendTrue if the log data should be added to an existing file.
void ofConsoleFileLoggerChannel::setFileLogLevel ( ofLogLevel  level)
inline

Set the minimum log level for the file log.

Note that this is additional level of filtering beyond that provided by the global ofSetLogLevel(). Anything below that log level will not be logged, regardless of the value of the file-specific log level.

Parameters
levelthe log level to apply to the file log (defaults to OF_LOG_VERBOSE)

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