ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Static Public Member Functions | List of all members
el::Loggers Class Reference

Static helpers to deal with loggers and their configurations. More...

#include <easylogging++.h>

Inheritance diagram for el::Loggers:
el::base::StaticClass el::base::StaticClass el::base::StaticClass

Classes

class  ScopedAddFlag
 Adds flag and removes it when scope goes out. More...
 
class  ScopedRemoveFlag
 Removes flag and add it when scope goes out. More...
 

Static Public Member Functions

static LoggergetLogger (const std::string &identity, bool registerIfNotAvailable=true)
 Gets existing or registers new logger. More...
 
static bool unregisterLogger (const std::string &identity)
 Unregisters logger - use it only when you know what you are doing, you may unregister loggers initialized / used by third-party libs. More...
 
static bool hasLogger (const std::string &identity)
 Whether or not logger with id is registered. More...
 
static LoggerreconfigureLogger (Logger *logger, const Configurations &configurations)
 Reconfigures specified logger with new configurations. More...
 
static LoggerreconfigureLogger (const std::string &identity, const Configurations &configurations)
 Reconfigures logger with new configurations after looking it up using identity. More...
 
static LoggerreconfigureLogger (const std::string &identity, ConfigurationType configurationType, const std::string &value)
 Reconfigures logger's single configuration. More...
 
static void reconfigureAllLoggers (const Configurations &configurations)
 Reconfigures all the existing loggers with new configurations. More...
 
static void reconfigureAllLoggers (ConfigurationType configurationType, const std::string &value)
 Reconfigures single configuration for all the loggers. More...
 
static void reconfigureAllLoggers (Level level, ConfigurationType configurationType, const std::string &value)
 Reconfigures single configuration for all the loggers for specified level. More...
 
static void setDefaultConfigurations (const Configurations &configurations, bool reconfigureExistingLoggers=false)
 Sets default configurations. This configuration is used for future (and conditionally for existing) loggers. More...
 
static const ConfigurationsdefaultConfigurations (void)
 Returns current default. More...
 
static const
base::LogStreamsReferenceMap
logStreamsReference (void)
 Returns log stream reference pointer if needed by user. More...
 
static base::TypedConfigurations defaultTypedConfigurations (void)
 Default typed configuration based on existing defaultConf. More...
 
static std::vector< std::string > * populateAllLoggerIds (std::vector< std::string > *targetList)
 Populates all logger IDs in current repository. More...
 
static void configureFromGlobal (const char *globalConfigurationFilePath)
 Sets configurations from global configuration file. More...
 
static bool configureFromArg (const char *argKey)
 Configures loggers using command line arg. Ensure you have already set command line args,. More...
 
static void flushAll (void)
 Flushes all loggers for all levels - Be careful if you dont know how many loggers are registered. More...
 
static void addFlag (LoggingFlag flag)
 Adds logging flag used internally. More...
 
static void removeFlag (LoggingFlag flag)
 Removes logging flag used internally. More...
 
static bool hasFlag (LoggingFlag flag)
 Determines whether or not certain flag is active. More...
 
static void setLoggingLevel (Level level)
 Sets hierarchy for logging. Needs to enable logging flag (HierarchicalLogging) More...
 
static void setVerboseLevel (base::type::VerboseLevel level)
 Sets verbose level on the fly. More...
 
static base::type::VerboseLevel verboseLevel (void)
 Gets current verbose level. More...
 
static void setVModules (const char *modules)
 Sets vmodules as specified (on the fly) More...
 
static void clearVModules (void)
 Clears vmodules. More...
 
static LoggergetLogger (const std::string &identity, bool registerIfNotAvailable=true)
 Gets existing or registers new logger. More...
 
static bool unregisterLogger (const std::string &identity)
 Unregisters logger - use it only when you know what you are doing, you may unregister loggers initialized / used by third-party libs. More...
 
static bool hasLogger (const std::string &identity)
 Whether or not logger with id is registered. More...
 
static LoggerreconfigureLogger (Logger *logger, const Configurations &configurations)
 Reconfigures specified logger with new configurations. More...
 
static LoggerreconfigureLogger (const std::string &identity, const Configurations &configurations)
 Reconfigures logger with new configurations after looking it up using identity. More...
 
static LoggerreconfigureLogger (const std::string &identity, ConfigurationType configurationType, const std::string &value)
 Reconfigures logger's single configuration. More...
 
static void reconfigureAllLoggers (const Configurations &configurations)
 Reconfigures all the existing loggers with new configurations. More...
 
static void reconfigureAllLoggers (ConfigurationType configurationType, const std::string &value)
 Reconfigures single configuration for all the loggers. More...
 
static void reconfigureAllLoggers (Level level, ConfigurationType configurationType, const std::string &value)
 Reconfigures single configuration for all the loggers for specified level. More...
 
static void setDefaultConfigurations (const Configurations &configurations, bool reconfigureExistingLoggers=false)
 Sets default configurations. This configuration is used for future (and conditionally for existing) loggers. More...
 
static const ConfigurationsdefaultConfigurations (void)
 Returns current default. More...
 
static const
base::LogStreamsReferenceMap
logStreamsReference (void)
 Returns log stream reference pointer if needed by user. More...
 
static base::TypedConfigurations defaultTypedConfigurations (void)
 Default typed configuration based on existing defaultConf. More...
 
static std::vector< std::string > * populateAllLoggerIds (std::vector< std::string > *targetList)
 Populates all logger IDs in current repository. More...
 
static void configureFromGlobal (const char *globalConfigurationFilePath)
 Sets configurations from global configuration file. More...
 
static bool configureFromArg (const char *argKey)
 Configures loggers using command line arg. Ensure you have already set command line args,. More...
 
static void flushAll (void)
 Flushes all loggers for all levels - Be careful if you dont know how many loggers are registered. More...
 
static void addFlag (LoggingFlag flag)
 Adds logging flag used internally. More...
 
static void removeFlag (LoggingFlag flag)
 Removes logging flag used internally. More...
 
static bool hasFlag (LoggingFlag flag)
 Determines whether or not certain flag is active. More...
 
static void setLoggingLevel (Level level)
 Sets hierarchy for logging. Needs to enable logging flag (HierarchicalLogging) More...
 
static void setVerboseLevel (base::type::VerboseLevel level)
 Sets verbose level on the fly. More...
 
static base::type::VerboseLevel verboseLevel (void)
 Gets current verbose level. More...
 
static void setVModules (const char *modules)
 Sets vmodules as specified (on the fly) More...
 
static void clearVModules (void)
 Clears vmodules. More...
 
static LoggergetLogger (const std::string &identity, bool registerIfNotAvailable=true)
 Gets existing or registers new logger. More...
 
static bool unregisterLogger (const std::string &identity)
 Unregisters logger - use it only when you know what you are doing, you may unregister loggers initialized / used by third-party libs. More...
 
static bool hasLogger (const std::string &identity)
 Whether or not logger with id is registered. More...
 
static LoggerreconfigureLogger (Logger *logger, const Configurations &configurations)
 Reconfigures specified logger with new configurations. More...
 
static LoggerreconfigureLogger (const std::string &identity, const Configurations &configurations)
 Reconfigures logger with new configurations after looking it up using identity. More...
 
static LoggerreconfigureLogger (const std::string &identity, ConfigurationType configurationType, const std::string &value)
 Reconfigures logger's single configuration. More...
 
static void reconfigureAllLoggers (const Configurations &configurations)
 Reconfigures all the existing loggers with new configurations. More...
 
static void reconfigureAllLoggers (ConfigurationType configurationType, const std::string &value)
 Reconfigures single configuration for all the loggers. More...
 
static void reconfigureAllLoggers (Level level, ConfigurationType configurationType, const std::string &value)
 Reconfigures single configuration for all the loggers for specified level. More...
 
static void setDefaultConfigurations (const Configurations &configurations, bool reconfigureExistingLoggers=false)
 Sets default configurations. This configuration is used for future (and conditionally for existing) loggers. More...
 
static const ConfigurationsdefaultConfigurations (void)
 Returns current default. More...
 
static const
base::LogStreamsReferenceMap
logStreamsReference (void)
 Returns log stream reference pointer if needed by user. More...
 
static base::TypedConfigurations defaultTypedConfigurations (void)
 Default typed configuration based on existing defaultConf. More...
 
static std::vector< std::string > * populateAllLoggerIds (std::vector< std::string > *targetList)
 Populates all logger IDs in current repository. More...
 
static void configureFromGlobal (const char *globalConfigurationFilePath)
 Sets configurations from global configuration file. More...
 
static bool configureFromArg (const char *argKey)
 Configures loggers using command line arg. Ensure you have already set command line args,. More...
 
static void flushAll (void)
 Flushes all loggers for all levels - Be careful if you dont know how many loggers are registered. More...
 
static void addFlag (LoggingFlag flag)
 Adds logging flag used internally. More...
 
static void removeFlag (LoggingFlag flag)
 Removes logging flag used internally. More...
 
static bool hasFlag (LoggingFlag flag)
 Determines whether or not certain flag is active. More...
 
static void setLoggingLevel (Level level)
 Sets hierarchy for logging. Needs to enable logging flag (HierarchicalLogging) More...
 
static void setVerboseLevel (base::type::VerboseLevel level)
 Sets verbose level on the fly. More...
 
static base::type::VerboseLevel verboseLevel (void)
 Gets current verbose level. More...
 
static void setVModules (const char *modules)
 Sets vmodules as specified (on the fly) More...
 
static void clearVModules (void)
 Clears vmodules. More...
 

Detailed Description

Static helpers to deal with loggers and their configurations.

Member Function Documentation

static void el::Loggers::addFlag ( LoggingFlag  flag)
inlinestatic

Adds logging flag used internally.

static void el::Loggers::addFlag ( LoggingFlag  flag)
inlinestatic

Adds logging flag used internally.

static void el::Loggers::addFlag ( LoggingFlag  flag)
inlinestatic

Adds logging flag used internally.

static void el::Loggers::clearVModules ( void  )
inlinestatic

Clears vmodules.

static void el::Loggers::clearVModules ( void  )
inlinestatic

Clears vmodules.

static void el::Loggers::clearVModules ( void  )
inlinestatic

Clears vmodules.

static bool el::Loggers::configureFromArg ( const char *  argKey)
inlinestatic

Configures loggers using command line arg. Ensure you have already set command line args,.

Returns
False if invalid argument or argument with no value provided, true if attempted to configure logger. If true is returned that does not mean it has been configured successfully, it only means that it has attempeted to configure logger using configuration file provided in argument
static bool el::Loggers::configureFromArg ( const char *  argKey)
inlinestatic

Configures loggers using command line arg. Ensure you have already set command line args,.

Returns
False if invalid argument or argument with no value provided, true if attempted to configure logger. If true is returned that does not mean it has been configured successfully, it only means that it has attempeted to configure logger using configuration file provided in argument
static bool el::Loggers::configureFromArg ( const char *  argKey)
inlinestatic

Configures loggers using command line arg. Ensure you have already set command line args,.

Returns
False if invalid argument or argument with no value provided, true if attempted to configure logger. If true is returned that does not mean it has been configured successfully, it only means that it has attempeted to configure logger using configuration file provided in argument
static void el::Loggers::configureFromGlobal ( const char *  globalConfigurationFilePath)
inlinestatic

Sets configurations from global configuration file.

static void el::Loggers::configureFromGlobal ( const char *  globalConfigurationFilePath)
inlinestatic

Sets configurations from global configuration file.

static void el::Loggers::configureFromGlobal ( const char *  globalConfigurationFilePath)
inlinestatic

Sets configurations from global configuration file.

static const Configurations* el::Loggers::defaultConfigurations ( void  )
inlinestatic

Returns current default.

static const Configurations* el::Loggers::defaultConfigurations ( void  )
inlinestatic

Returns current default.

static const Configurations* el::Loggers::defaultConfigurations ( void  )
inlinestatic

Returns current default.

static base::TypedConfigurations el::Loggers::defaultTypedConfigurations ( void  )
inlinestatic

Default typed configuration based on existing defaultConf.

static base::TypedConfigurations el::Loggers::defaultTypedConfigurations ( void  )
inlinestatic

Default typed configuration based on existing defaultConf.

static base::TypedConfigurations el::Loggers::defaultTypedConfigurations ( void  )
inlinestatic

Default typed configuration based on existing defaultConf.

static void el::Loggers::flushAll ( void  )
inlinestatic

Flushes all loggers for all levels - Be careful if you dont know how many loggers are registered.

static void el::Loggers::flushAll ( void  )
inlinestatic

Flushes all loggers for all levels - Be careful if you dont know how many loggers are registered.

static void el::Loggers::flushAll ( void  )
inlinestatic

Flushes all loggers for all levels - Be careful if you dont know how many loggers are registered.

static Logger* el::Loggers::getLogger ( const std::string &  identity,
bool  registerIfNotAvailable = true 
)
inlinestatic

Gets existing or registers new logger.

static Logger* el::Loggers::getLogger ( const std::string &  identity,
bool  registerIfNotAvailable = true 
)
inlinestatic

Gets existing or registers new logger.

static Logger* el::Loggers::getLogger ( const std::string &  identity,
bool  registerIfNotAvailable = true 
)
inlinestatic

Gets existing or registers new logger.

static bool el::Loggers::hasFlag ( LoggingFlag  flag)
inlinestatic

Determines whether or not certain flag is active.

static bool el::Loggers::hasFlag ( LoggingFlag  flag)
inlinestatic

Determines whether or not certain flag is active.

static bool el::Loggers::hasFlag ( LoggingFlag  flag)
inlinestatic

Determines whether or not certain flag is active.

static bool el::Loggers::hasLogger ( const std::string &  identity)
inlinestatic

Whether or not logger with id is registered.

static bool el::Loggers::hasLogger ( const std::string &  identity)
inlinestatic

Whether or not logger with id is registered.

static bool el::Loggers::hasLogger ( const std::string &  identity)
inlinestatic

Whether or not logger with id is registered.

static const base::LogStreamsReferenceMap* el::Loggers::logStreamsReference ( void  )
inlinestatic

Returns log stream reference pointer if needed by user.

static const base::LogStreamsReferenceMap* el::Loggers::logStreamsReference ( void  )
inlinestatic

Returns log stream reference pointer if needed by user.

static const base::LogStreamsReferenceMap* el::Loggers::logStreamsReference ( void  )
inlinestatic

Returns log stream reference pointer if needed by user.

static std::vector<std::string>* el::Loggers::populateAllLoggerIds ( std::vector< std::string > *  targetList)
inlinestatic

Populates all logger IDs in current repository.

Parameters
[out]targetListList of fill up.
static std::vector<std::string>* el::Loggers::populateAllLoggerIds ( std::vector< std::string > *  targetList)
inlinestatic

Populates all logger IDs in current repository.

Parameters
[out]targetListList of fill up.
static std::vector<std::string>* el::Loggers::populateAllLoggerIds ( std::vector< std::string > *  targetList)
inlinestatic

Populates all logger IDs in current repository.

Parameters
[out]targetListList of fill up.
static void el::Loggers::reconfigureAllLoggers ( const Configurations configurations)
inlinestatic

Reconfigures all the existing loggers with new configurations.

static void el::Loggers::reconfigureAllLoggers ( const Configurations configurations)
inlinestatic

Reconfigures all the existing loggers with new configurations.

static void el::Loggers::reconfigureAllLoggers ( const Configurations configurations)
inlinestatic

Reconfigures all the existing loggers with new configurations.

static void el::Loggers::reconfigureAllLoggers ( ConfigurationType  configurationType,
const std::string &  value 
)
inlinestatic

Reconfigures single configuration for all the loggers.

static void el::Loggers::reconfigureAllLoggers ( ConfigurationType  configurationType,
const std::string &  value 
)
inlinestatic

Reconfigures single configuration for all the loggers.

static void el::Loggers::reconfigureAllLoggers ( ConfigurationType  configurationType,
const std::string &  value 
)
inlinestatic

Reconfigures single configuration for all the loggers.

static void el::Loggers::reconfigureAllLoggers ( Level  level,
ConfigurationType  configurationType,
const std::string &  value 
)
inlinestatic

Reconfigures single configuration for all the loggers for specified level.

static void el::Loggers::reconfigureAllLoggers ( Level  level,
ConfigurationType  configurationType,
const std::string &  value 
)
inlinestatic

Reconfigures single configuration for all the loggers for specified level.

static void el::Loggers::reconfigureAllLoggers ( Level  level,
ConfigurationType  configurationType,
const std::string &  value 
)
inlinestatic

Reconfigures single configuration for all the loggers for specified level.

static Logger* el::Loggers::reconfigureLogger ( Logger logger,
const Configurations configurations 
)
inlinestatic

Reconfigures specified logger with new configurations.

static Logger* el::Loggers::reconfigureLogger ( Logger logger,
const Configurations configurations 
)
inlinestatic

Reconfigures specified logger with new configurations.

static Logger* el::Loggers::reconfigureLogger ( Logger logger,
const Configurations configurations 
)
inlinestatic

Reconfigures specified logger with new configurations.

static Logger* el::Loggers::reconfigureLogger ( const std::string &  identity,
const Configurations configurations 
)
inlinestatic

Reconfigures logger with new configurations after looking it up using identity.

static Logger* el::Loggers::reconfigureLogger ( const std::string &  identity,
const Configurations configurations 
)
inlinestatic

Reconfigures logger with new configurations after looking it up using identity.

static Logger* el::Loggers::reconfigureLogger ( const std::string &  identity,
const Configurations configurations 
)
inlinestatic

Reconfigures logger with new configurations after looking it up using identity.

static Logger* el::Loggers::reconfigureLogger ( const std::string &  identity,
ConfigurationType  configurationType,
const std::string &  value 
)
inlinestatic

Reconfigures logger's single configuration.

static Logger* el::Loggers::reconfigureLogger ( const std::string &  identity,
ConfigurationType  configurationType,
const std::string &  value 
)
inlinestatic

Reconfigures logger's single configuration.

static Logger* el::Loggers::reconfigureLogger ( const std::string &  identity,
ConfigurationType  configurationType,
const std::string &  value 
)
inlinestatic

Reconfigures logger's single configuration.

static void el::Loggers::removeFlag ( LoggingFlag  flag)
inlinestatic

Removes logging flag used internally.

static void el::Loggers::removeFlag ( LoggingFlag  flag)
inlinestatic

Removes logging flag used internally.

static void el::Loggers::removeFlag ( LoggingFlag  flag)
inlinestatic

Removes logging flag used internally.

static void el::Loggers::setDefaultConfigurations ( const Configurations configurations,
bool  reconfigureExistingLoggers = false 
)
inlinestatic

Sets default configurations. This configuration is used for future (and conditionally for existing) loggers.

static void el::Loggers::setDefaultConfigurations ( const Configurations configurations,
bool  reconfigureExistingLoggers = false 
)
inlinestatic

Sets default configurations. This configuration is used for future (and conditionally for existing) loggers.

static void el::Loggers::setDefaultConfigurations ( const Configurations configurations,
bool  reconfigureExistingLoggers = false 
)
inlinestatic

Sets default configurations. This configuration is used for future (and conditionally for existing) loggers.

static void el::Loggers::setLoggingLevel ( Level  level)
inlinestatic

Sets hierarchy for logging. Needs to enable logging flag (HierarchicalLogging)

static void el::Loggers::setLoggingLevel ( Level  level)
inlinestatic

Sets hierarchy for logging. Needs to enable logging flag (HierarchicalLogging)

static void el::Loggers::setLoggingLevel ( Level  level)
inlinestatic

Sets hierarchy for logging. Needs to enable logging flag (HierarchicalLogging)

static void el::Loggers::setVerboseLevel ( base::type::VerboseLevel  level)
inlinestatic

Sets verbose level on the fly.

static void el::Loggers::setVerboseLevel ( base::type::VerboseLevel  level)
inlinestatic

Sets verbose level on the fly.

static void el::Loggers::setVerboseLevel ( base::type::VerboseLevel  level)
inlinestatic

Sets verbose level on the fly.

static void el::Loggers::setVModules ( const char *  modules)
inlinestatic

Sets vmodules as specified (on the fly)

static void el::Loggers::setVModules ( const char *  modules)
inlinestatic

Sets vmodules as specified (on the fly)

static void el::Loggers::setVModules ( const char *  modules)
inlinestatic

Sets vmodules as specified (on the fly)

static bool el::Loggers::unregisterLogger ( const std::string &  identity)
inlinestatic

Unregisters logger - use it only when you know what you are doing, you may unregister loggers initialized / used by third-party libs.

static bool el::Loggers::unregisterLogger ( const std::string &  identity)
inlinestatic

Unregisters logger - use it only when you know what you are doing, you may unregister loggers initialized / used by third-party libs.

static bool el::Loggers::unregisterLogger ( const std::string &  identity)
inlinestatic

Unregisters logger - use it only when you know what you are doing, you may unregister loggers initialized / used by third-party libs.

static base::type::VerboseLevel el::Loggers::verboseLevel ( void  )
inlinestatic

Gets current verbose level.

static base::type::VerboseLevel el::Loggers::verboseLevel ( void  )
inlinestatic

Gets current verbose level.

static base::type::VerboseLevel el::Loggers::verboseLevel ( void  )
inlinestatic

Gets current verbose level.


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