Apache Log4cxx  Version 1.2.0
Loading...
Searching...
No Matches
log4cxx::BasicConfigurator Class Reference

Use BasicConfigurator (static) methods to configure Log4cxx when not using a configuration file. More...

#include <basicconfigurator.h>

Static Public Member Functions

static void configure (const LayoutPtr &layout=LayoutPtr())
 Add a ConsoleAppender to the root logger that formats output using layout.
 
static void configure (const AppenderPtr &appender)
 Add appender to the root logger.
 
static void resetConfiguration ()
 Reset the default hierarchy to its defaut.
 

Protected Member Functions

 BasicConfigurator ()
 

Detailed Description

Use BasicConfigurator (static) methods to configure Log4cxx when not using a configuration file.

For key=value format configuration see PropertyConfigurator. For XML format configuration see xml::DOMConfigurator.

Constructor & Destructor Documentation

◆ BasicConfigurator()

log4cxx::BasicConfigurator::BasicConfigurator ( )
inlineprotected

Member Function Documentation

◆ configure() [1/2]

static void log4cxx::BasicConfigurator::configure ( const AppenderPtr appender)
static

Add appender to the root logger.

Parameters
appenderThe appender to add to the root logger.

◆ configure() [2/2]

static void log4cxx::BasicConfigurator::configure ( const LayoutPtr layout = LayoutPtr())
static

Add a ConsoleAppender to the root logger that formats output using layout.

If layout is not provided, use a PatternLayout with %r [%t] %p %c %x - %m%n as the conversion pattern.

◆ resetConfiguration()

static void log4cxx::BasicConfigurator::resetConfiguration ( )
static

Reset the default hierarchy to its defaut.

It is equivalent to calling Logger::getDefaultHierarchy()->resetConfiguration(). See Hierarchy::resetConfiguration() for more details.


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