Tracks the global logging configuration.
#include <CLogger.hpp>
|
typedef std::map< const
std::string, unsigned int > | OutputMap |
| Type of container for the output levels. More...
|
|
unsigned int freedm::broker::CGlobalLogger::GetOutputLevel |
( |
const std::string |
logger | ) |
const |
CGlobalLogger::GetOutputLevel
- Description:
- Gets the output level of the specified logger.
- Precondition:
- None
- Postcondition:
- Throws an exception if the specified logger does not exist.
- Parameters
-
logger | the name of the logger to fetch the output level for. |
- Returns
- The output level of the logger.
- Description:
- The GlobalLogger is responsible for tracking a table which lists the names of the different loggers and their current output levels.
- Limitations:
- Singleton. Cannot be copied.
CGlobalLogger::instance
- Description:
- Gets the global logger which stores the configuration info for the other loggers.
- Precondition:
- None
- Postcondition:
- None
- Returns
- The instance of the global logger.
void freedm::broker::CGlobalLogger::ListLoggers |
( |
| ) |
const |
CGlobaLogger::ListLoggers
- Description:
- Prints a list of the loggers and their level to stdout.
- Precondition:
- None
- Postcondition:
- The registered loggers and their current level are printed to stdout.
void freedm::broker::CGlobalLogger::RegisterLocalLogger |
( |
const std::string |
logger | ) |
|
CGlobalLogger::RegisterLocalLogger
- Description:
- Registers a local logger with the global logger so it can be enumerated for functions like SetGlobalLevel.
- Precondition:
- None
- Postcondition:
- The loggers name is added to the loggers table.
- Parameters
-
logger | the name of the CLogger being added. |
void freedm::broker::CGlobalLogger::SetGlobalLevel |
( |
const unsigned int |
level | ) |
|
CGlobalLogger::SetGlobalLevel
- Description:
- For reach logger that the GlobalLogger is aware of set the loggers level to the specified value
- Precondition:
- None
- Postcondition:
- Every logger's log level is changed to level.
- Parameters
-
level | The new desired log level. |
void freedm::broker::CGlobalLogger::SetInitialLoggerLevels |
( |
const std::string |
loggerCfgFile | ) |
|
CGlobalLogger::SetInitialLoggerLevels
- Description:
- Sets the logger verbosity levels to the values specified as default or in one of the configuration files.
- Precondition:
- None
- Postcondition:
- Logger levels are set to the levels specified in the logger config file. Exceptions may be thrown if the file is not correctly formatted or contains invalid entries.
- Parameters
-
loggerCfgFile | the name of the config file to process the values from. |
void freedm::broker::CGlobalLogger::SetOutputLevel |
( |
const std::string |
logger, |
|
|
const unsigned int |
level |
|
) |
| |
CGlobalLogger::SetOutputLevel
- Description:
- Sets the output level of the specified logger.
- Precondition:
- The logger has been registered with the GlobalLogger.
- Postcondition:
- The logger's level has been set to the specified value.
- Parameters
-
logger | The name of the logger to modify. |
level | The level the the logger's output should be set to. |
unsigned int freedm::broker::CGlobalLogger::m_default |
|
private |
OutputMap freedm::broker::CGlobalLogger::m_loggers |
|
private |
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/freedm/checkouts/opnet-ecn/Broker/src/CLogger.hpp
- /home/docs/checkouts/readthedocs.org/user_builds/freedm/checkouts/opnet-ecn/Broker/src/CLogger.cpp