RDFS
The Rice Comp413 2017 class' continuation on the work of the 2016 RDFS.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends 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

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.
 
static void setDefaultLogBuilder (el::LogBuilderPtr &logBuilderPtr)
 Changes default log builder for future loggers.
 
template<typename T >
static bool installLoggerRegistrationCallback (const std::string &id)
 Installs logger registration callback, this callback is triggered when new logger is registered.
 
template<typename T >
static void uninstallLoggerRegistrationCallback (const std::string &id)
 Uninstalls log dispatch callback.
 
template<typename T >
static T * loggerRegistrationCallback (const std::string &id)
 
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.
 
static bool hasLogger (const std::string &identity)
 Whether or not logger with id is registered.
 
static LoggerreconfigureLogger (Logger *logger, const Configurations &configurations)
 Reconfigures specified logger with new configurations.
 
static LoggerreconfigureLogger (const std::string &identity, const Configurations &configurations)
 Reconfigures logger with new configurations after looking it up using identity.
 
static LoggerreconfigureLogger (const std::string &identity, ConfigurationType configurationType, const std::string &value)
 Reconfigures logger's single configuration.
 
static void reconfigureAllLoggers (const Configurations &configurations)
 Reconfigures all the existing loggers with new configurations.
 
static void reconfigureAllLoggers (ConfigurationType configurationType, const std::string &value)
 Reconfigures single configuration for all the loggers.
 
static void reconfigureAllLoggers (Level level, ConfigurationType configurationType, const std::string &value)
 Reconfigures single configuration for all the loggers for specified level.
 
static void setDefaultConfigurations (const Configurations &configurations, bool reconfigureExistingLoggers=false)
 Sets default configurations. This configuration is used for future (and conditionally for existing) loggers.
 
static const ConfigurationsdefaultConfigurations (void)
 Returns current default.
 
static const
base::LogStreamsReferenceMap * 
logStreamsReference (void)
 Returns log stream reference pointer if needed by user.
 
static base::TypedConfigurations defaultTypedConfigurations (void)
 Default typed configuration based on existing defaultConf.
 
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.
 
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.
 
static void addFlag (LoggingFlag flag)
 Adds logging flag used internally.
 
static void removeFlag (LoggingFlag flag)
 Removes logging flag used internally.
 
static bool hasFlag (LoggingFlag flag)
 Determines whether or not certain flag is active.
 
static void setLoggingLevel (Level level)
 Sets hierarchy for logging. Needs to enable logging flag (HierarchicalLogging)
 
static void setVerboseLevel (base::type::VerboseLevel level)
 Sets verbose level on the fly.
 
static base::type::VerboseLevel verboseLevel (void)
 Gets current verbose level.
 
static void setVModules (const char *modules)
 Sets vmodules as specified (on the fly)
 
static void clearVModules (void)
 Clears vmodules.
 

Detailed Description

Static helpers to deal with loggers and their configurations.

Member Function Documentation

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

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
std::vector< std::string > * el::Loggers::populateAllLoggerIds ( std::vector< std::string > *  targetList)
static

Populates all logger IDs in current repository.

Parameters
[out]targetListList of fill up.

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