log4cplus::BasicConfigurator Class Reference

Use this class to quickly configure the package. More...

`#include <configurator.h>`

Inheritance diagram for log4cplus::BasicConfigurator:
[legend]
Collaboration diagram for log4cplus::BasicConfigurator:
[legend]

## Public Member Functions

| BasicConfigurator (Hierarchy &h=Logger::getDefaultHierarchy(), bool logToStdErr=false)
virtual | ~BasicConfigurator ()
Public Member Functions inherited from log4cplus::PropertyConfigurator
| PropertyConfigurator (const log4cplus::tstring &propertyFile, Hierarchy &h=Logger::getDefaultHierarchy(), unsigned flags=0)
| PropertyConfigurator (const log4cplus::helpers::Properties &props, Hierarchy &h=Logger::getDefaultHierarchy(), unsigned flags=0)
| PropertyConfigurator (log4cplus::tistream &propertyStream, Hierarchy &h=Logger::getDefaultHierarchy(), unsigned flags=0)
virtual | ~PropertyConfigurator ()
virtual void | configure ()
| Read configuration from a file.
log4cplus::helpers::Properties const & | getProperties () const
log4cplus::tstring const & | getPropertyFilename () const

## Static Public Member Functions

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 Public Member Functions inherited from log4cplus::PropertyConfigurator
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.

## Static Public Attributes

static log4cplus::tstring const | DISABLE_OVERRIDE_KEY
| Property name for disable override.

## Additional Inherited Members

Public Types inherited from log4cplus::PropertyConfigurator
enum | PCFlags { fRecursiveExpansion = (1 << 0) , fShadowEnvironment = (1 << 1) , fAllowEmptyVars = (1 << 2) , fEncodingShift = 3 , fEncodingMask = 0x3 , fUnspecEncoding = (0 << fEncodingShift) , fThrow = (1 << 5) }
Protected Types inherited from log4cplus::PropertyConfigurator
typedef std::map< log4cplus::tstring, log4cplus::SharedAppenderPtr > | AppenderMap
Protected Member Functions inherited from log4cplus::PropertyConfigurator
void | init ()
void | reconfigure ()
void | replaceEnvironVariables ()
void | configureLoggers ()
void | configureLogger (log4cplus::Logger logger, const log4cplus::tstring &config)
void | configureAppenders ()
void | configureAdditivity ()
virtual Logger | getLogger (const log4cplus::tstring &name)
virtual void | addAppender (Logger &logger, log4cplus::SharedAppenderPtr &appender)
Protected Attributes inherited from log4cplus::PropertyConfigurator
Hierarchy & | h
log4cplus::tstring | propertyFilename
log4cplus::helpers::Properties | properties
AppenderMap | appenders
unsigned | flags

## Detailed Description

Use this class to quickly configure the package.

For file based configuration see PropertyConfigurator. BasicConfigurator automatically attaches ConsoleAppender to `rootLogger`, with output going to standard output, using DEBUG LogLevel value. The additional parameter logToStdErr may redirect the output to standard error.

Definition at line 336 of file configurator.h.

## Constructor & Destructor Documentation

## BasicConfigurator()

log4cplus::BasicConfigurator::BasicConfigurator | ( | Hierarchy & | h = Logger::getDefaultHierarchy(),
|  | bool | logToStdErr = false )

References log4cplus::Logger::getDefaultHierarchy(), and log4cplus::PropertyConfigurator::h.

## ~BasicConfigurator()

virtual log4cplus::BasicConfigurator::~BasicConfigurator | ( |  | ) |

virtual

## Member Function Documentation

## doConfigure()

void log4cplus::BasicConfigurator::doConfigure | ( | Hierarchy & | h = Logger::getDefaultHierarchy(),
|  | bool | logToStdErr = false )

static

This method eliminates the need to create a temporary `BasicConfigurator` object to configure log4cplus.

It is equivalent to the following:
``

    BasicConfigurator config;
    config.configure();

References log4cplus::Logger::getDefaultHierarchy(), and log4cplus::PropertyConfigurator::h.

## Member Data Documentation

## DISABLE_OVERRIDE_KEY

log4cplus::tstring const log4cplus::BasicConfigurator::DISABLE_OVERRIDE_KEY

static

Property name for disable override.

Definition at line 356 of file configurator.h.

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

- configurator.h