 |
log4cplus
2.0.5
|
Go to the documentation of this file.
24 #ifndef LOG4CPLUS_CONFIGURATOR_HEADER_
25 #define LOG4CPLUS_CONFIGURATOR_HEADER_
29 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
72 fRecursiveExpansion = (1 << 0)
73 , fShadowEnvironment = (1 << 1)
74 , fAllowEmptyVars = (1 << 2)
82 , fUnspecEncoding = (0 << fEncodingShift)
83 #if defined (LOG4CPLUS_HAVE_CODECVT_UTF8_FACET) && defined (UNICODE)
84 , fUTF8 = (1 << fEncodingShift)
86 #
if (defined (LOG4CPLUS_HAVE_CODECVT_UTF16_FACET) || defined (_WIN32)) \
88 , fUTF16 = (2 << fEncodingShift)
90 #
if defined (LOG4CPLUS_HAVE_CODECVT_UTF32_FACET) && defined (UNICODE)
91 , fUTF32 = (3 << fEncodingShift)
300 typedef std::map<log4cplus::tstring, log4cplus::SharedAppenderPtr>
AppenderMap;
329 bool logToStdErr =
false);
342 bool logToStdErr =
false);
354 #if !defined(LOG4CPLUS_SINGLE_THREADED)
356 class ConfigurationWatchDogThread;
363 unsigned int millis = 60 * 1000);
372 ConfigurationWatchDogThread * watchDogThread;
378 #endif // LOG4CPLUS_CONFIGURATOR_HEADER_
std::basic_string< tchar > tstring
This header defines the Logger class and the logging macros.
virtual ~PropertyConfigurator()
virtual void configure()
Read configuration from a file.
log4cplus::tstring propertyFilename
log4cplus::tstring const & getPropertyFilename() const
Use this class to quickly configure the package.
void configureAdditivity()
log4cplus::helpers::Properties properties
static void doConfigure(const log4cplus::tstring &configFilename, Hierarchy &h=Logger::getDefaultHierarchy(), unsigned flags=0)
This method eliminates the need to create a temporary PropertyConfigurator to configure log4cplus.
virtual void addAppender(Logger &logger, log4cplus::SharedAppenderPtr &appender)
std::map< log4cplus::tstring, log4cplus::SharedAppenderPtr > AppenderMap
PropertyConfigurator(log4cplus::tistream &propertyStream, Hierarchy &h=Logger::getDefaultHierarchy(), unsigned flags=0)
log4cplus::helpers::Properties const & getProperties() const
BasicConfigurator(Hierarchy &h=Logger::getDefaultHierarchy(), bool logToStdErr=false)
void replaceEnvironVariables()
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.
virtual ~BasicConfigurator()
std::basic_istream< tchar > tistream
PropertyConfigurator(const log4cplus::tstring &propertyFile, Hierarchy &h=Logger::getDefaultHierarchy(), unsigned flags=0)
void configureLogger(log4cplus::Logger logger, const log4cplus::tstring &config)
static void doConfigure(Hierarchy &h=Logger::getDefaultHierarchy(), bool logToStdErr=false)
This method eliminates the need to create a temporary BasicConfigurator object to configure log4cplus...
Provides configuration from an external file.
void configureAppenders()
virtual Logger getLogger(const log4cplus::tstring &name)
static Hierarchy & getDefaultHierarchy()
Return the default Hierarchy instance.
static log4cplus::tstring const DISABLE_OVERRIDE_KEY
Property name for disable override.
PropertyConfigurator(const log4cplus::helpers::Properties &props, Hierarchy &h=Logger::getDefaultHierarchy(), unsigned flags=0)
This is the central class in the log4cplus package.