FREEDM DGI
Public Member Functions | Public Attributes | Private Attributes | List of all members
freedm::broker::CLocalLogger Class Reference

#include <CLogger.hpp>

Inheritance diagram for freedm::broker::CLocalLogger:

Public Member Functions

 CLocalLogger (const std::string loggername)
 Initializes the local statics. More...
 
std::string GetName () const
 Returns the name of this logger. More...
 
unsigned int GetOutputLevel () const
 Returns the filtering level for this set of loggers. More...
 
void SetOutputLevel (const unsigned int level)
 Sets the output level for this set of loggers. More...
 

Public Attributes

boost::iostreams::stream< CLogAlert
 Logger. More...
 
boost::iostreams::stream< CLogDebug
 Logger. More...
 
boost::iostreams::stream< CLogError
 Logger. More...
 
boost::iostreams::stream< CLogFatal
 Logger. More...
 
boost::iostreams::stream< CLogInfo
 Logger. More...
 
boost::iostreams::stream< CLogNotice
 Logger. More...
 
boost::iostreams::stream< CLogStatus
 Logger. More...
 
boost::iostreams::stream< CLogTrace
 Logger. More...
 
boost::iostreams::stream< CLogWarn
 Logger. More...
 

Private Attributes

const std::string m_name
 The name of this logger. More...
 

Constructor & Destructor Documentation

freedm::broker::CLocalLogger::CLocalLogger ( const std::string  loggername)
Description:
Tracks the loggers available to the namespace the logger is instantiated in. Loggers can share names. Loggers are typically declared as static members of the files that the logger is used in.
Limitations:
Logging in header files is kind of hacky: the logger must have a globally unique name, where the those in cpps can share one name since they are declared statically.

CLocalLogger::CLocalLogger

Description:
Constructor for the CLocalLogger, an object that manages a a group of CLogs of differing output levels.
Parameters
loggernameThe name of this logger set.
Precondition:
None
Postcondition:
Creates log levels 0-8 for the logger specified by loggername. Registers this local logger with the GlobalLogger.

Member Function Documentation

std::string freedm::broker::CLocalLogger::GetName ( ) const

CLocalLogger::GetName

Description:
Gets the name of this logger
Precondition:
None
Postcondition:
None
Returns
The name of the logger.
unsigned int freedm::broker::CLocalLogger::GetOutputLevel ( ) const

CLocalLogger::GetOutputLevel

Description:
Gets the logger's output level, which decides how verbose the logger will be
Precondition:
None
Postcondition:
None
Returns
The output level of this logger.
void freedm::broker::CLocalLogger::SetOutputLevel ( const unsigned int  level)

CLocalLogger::SetOutputLevel

Description:
Sets the logger's output level, which describes how verbose the logger is
Precondition:
None
Postcondition:
The level value is stored in the GlobalLogger.

Member Data Documentation

boost::iostreams::stream<CLog> freedm::broker::CLocalLogger::Alert
boost::iostreams::stream<CLog> freedm::broker::CLocalLogger::Debug
boost::iostreams::stream<CLog> freedm::broker::CLocalLogger::Error
boost::iostreams::stream<CLog> freedm::broker::CLocalLogger::Fatal
boost::iostreams::stream<CLog> freedm::broker::CLocalLogger::Info
const std::string freedm::broker::CLocalLogger::m_name
private
boost::iostreams::stream<CLog> freedm::broker::CLocalLogger::Notice
boost::iostreams::stream<CLog> freedm::broker::CLocalLogger::Status
boost::iostreams::stream<CLog> freedm::broker::CLocalLogger::Trace
boost::iostreams::stream<CLog> freedm::broker::CLocalLogger::Warn

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