RSC  0.19.0
rsc::logging::SGRConsoleLogger Class Reference

#include <SGRConsoleLogger.h>

Inheritance diagram for rsc::logging::SGRConsoleLogger:
Inheritance graph
Collaboration diagram for rsc::logging::SGRConsoleLogger:
Collaboration graph

Public Member Functions

 SGRConsoleLogger (const std::string &name)
 
virtual ~SGRConsoleLogger ()
 
- Public Member Functions inherited from rsc::logging::ConsoleLogger
 ConsoleLogger (const std::string &name, const Level &level=LEVEL_INFO)
 Creates a new logger with the given name and level INFO. More...
 
virtual ~ConsoleLogger ()
 
Level getLevel () const
 Returns the currently defined level of the logger. More...
 
void setLevel (const Level &level)
 
std::string getName () const
 Returns the hierarchical name of the logger. More...
 
void setName (const std::string &name)
 Sets the name of the logger. More...
 
void log (const Level &level, const std::string &msg)
 
- Public Member Functions inherited from rsc::logging::Logger
virtual ~Logger ()
 
virtual void log (const Level &level, const std::string &msg)=0
 Logs a message with the given level if it is enabled. More...
 
virtual void setLevel (const Level &level)=0
 Defines the level of the logger. More...
 
virtual void trace (const std::string &msg)
 Logs a message with trace logging level if this level is enabled. More...
 
virtual void debug (const std::string &msg)
 Logs a message with debug logging level if this level is enabled. More...
 
virtual void info (const std::string &msg)
 Logs a message with info logging level if this level is enabled. More...
 
virtual void warn (const std::string &msg)
 Logs a message with warn logging level if this level is enabled. More...
 
virtual void error (const std::string &msg)
 Logs a message with error logging level if this level is enabled. More...
 
virtual void fatal (const std::string &msg)
 Logs a message with fatal logging level if this level is enabled. More...
 
virtual bool isTraceEnabled () const
 
virtual bool isDebugEnabled () const
 
virtual bool isInfoEnabled () const
 
virtual bool isWarnEnabled () const
 
virtual bool isErrorEnabled () const
 
virtual bool isFatalEnabled () const
 
virtual bool isEnabledFor (const Level &level) const
 

Protected Member Functions

std::ostream & printHeader (std::ostream &stream, const Level &level)
 
std::ostream & printBody (std::ostream &stream, const Level &level, const std::string &msg)
 
- Protected Member Functions inherited from rsc::logging::ConsoleLogger
virtual std::ostream & printHeader (std::ostream &stream, const Level &level)
 Prints a generic header for this logger to the stream. More...
 
virtual std::ostream & printBody (std::ostream &stream, const Level &level, const std::string &msg)
 Print the msg as the body of the log message. More...
 

Additional Inherited Members

- Public Types inherited from rsc::logging::Logger
enum  Level {
  LEVEL_ALL = 0x11111111, LEVEL_TRACE = 60, LEVEL_DEBUG = 50, LEVEL_INFO = 40,
  LEVEL_WARN = 30, LEVEL_ERROR = 20, LEVEL_FATAL = 10, LEVEL_OFF = 0
}
 Possible logging levels. More...
 
- Static Public Member Functions inherited from rsc::logging::Logger
static LoggerPtr getLogger (const std::string &name)
 Returns a logger for the given name. More...
 
- Protected Attributes inherited from rsc::logging::ConsoleLogger
std::string name
 
Level level
 
boost::recursive_mutex mutex
 

Detailed Description

Author
jmoringe

Definition at line 41 of file SGRConsoleLogger.h.

Constructor & Destructor Documentation

rsc::logging::SGRConsoleLogger::SGRConsoleLogger ( const std::string &  name)

Definition at line 34 of file SGRConsoleLogger.cpp.

rsc::logging::SGRConsoleLogger::~SGRConsoleLogger ( )
virtual

Definition at line 38 of file SGRConsoleLogger.cpp.

Member Function Documentation

std::ostream & rsc::logging::SGRConsoleLogger::printBody ( std::ostream &  stream,
const Level level,
const std::string &  msg 
)
protected
std::ostream & rsc::logging::SGRConsoleLogger::printHeader ( std::ostream &  stream,
const Level level 
)
protected

Definition at line 40 of file SGRConsoleLogger.cpp.

References rsc::misc::currentTimeMillis(), and rsc::logging::ConsoleLogger::name.

Here is the call graph for this function:


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