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;
Use this class to quickly configure the package.
virtual ~BasicConfigurator()
BasicConfigurator(Hierarchy &h=Logger::getDefaultHierarchy(), bool logToStdErr=false)
static void doConfigure(Hierarchy &h=Logger::getDefaultHierarchy(), bool logToStdErr=false)
This method eliminates the need to create a temporary BasicConfigurator object to configure log4cplus...
static log4cplus::tstring const DISABLE_OVERRIDE_KEY
Property name for disable override.
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.
This is the central class in the log4cplus package.
static Hierarchy & getDefaultHierarchy()
Return the default Hierarchy instance.
Provides configuration from an external file.
void configureAdditivity()
log4cplus::tstring propertyFilename
PropertyConfigurator(const log4cplus::helpers::Properties &props, Hierarchy &h=Logger::getDefaultHierarchy(), unsigned flags=0)
virtual void configure()
Read configuration from a file.
log4cplus::helpers::Properties properties
void replaceEnvironVariables()
log4cplus::tstring const & getPropertyFilename() const
PropertyConfigurator(log4cplus::tistream &propertyStream, Hierarchy &h=Logger::getDefaultHierarchy(), unsigned flags=0)
virtual Logger getLogger(const log4cplus::tstring &name)
std::map< log4cplus::tstring, log4cplus::SharedAppenderPtr > AppenderMap
log4cplus::helpers::Properties const & getProperties() const
virtual ~PropertyConfigurator()
void configureAppenders()
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.
void configureLogger(log4cplus::Logger logger, const log4cplus::tstring &config)
PropertyConfigurator(const log4cplus::tstring &propertyFile, Hierarchy &h=Logger::getDefaultHierarchy(), unsigned flags=0)
virtual void addAppender(Logger &logger, log4cplus::SharedAppenderPtr &appender)
This header defines the Logger class and the logging macros.
std::basic_string< tchar > tstring
std::basic_istream< tchar > tistream