#include <cxxtools/log/cxxtools.h>

Public Types

typedef Logger::log_level_type log_level_type

Public Member Functions

 LogConfiguration ()
 LogConfiguration (const LogConfiguration &)
LogConfigurationoperator= (const LogConfiguration &)
 ~LogConfiguration ()
Implimpl ()
const Implimpl () const
int rootFlags () const
int logFlags (const std::string &category) const
void setRootFlags (int flags)
void setRootLevel (log_level_type level)
void setRootLevel (const std::string &level)
 Sets root level using string notation.
void setLogFlags (const std::string &category, int flags)
void setLogLevel (const std::string &category, log_level_type level)
void setLogLevel (const std::string &category, const std::string &level)
 Sets specific level using string notation.
void setFile (const std::string &fname)
void setFile (const std::string &fname, unsigned maxfilesize, unsigned maxbackupindex)
void setLoghost (const std::string &host, unsigned short port, bool broadcast=false)
void setStdout ()
void setStderr ()

Static Public Member Functions

static int strToLogFlags (const std::string &level)
 Converts a complex log level string to log_level_type.

Friends

class Impl

Member Typedef Documentation

Constructor & Destructor Documentation

cxxtools::LogConfiguration::LogConfiguration ( )
cxxtools::LogConfiguration::LogConfiguration ( const LogConfiguration )
cxxtools::LogConfiguration::~LogConfiguration ( )

Member Function Documentation

Impl* cxxtools::LogConfiguration::impl ( )
inline
const Impl* cxxtools::LogConfiguration::impl ( ) const
inline
int cxxtools::LogConfiguration::logFlags ( const std::string &  category) const
LogConfiguration& cxxtools::LogConfiguration::operator= ( const LogConfiguration )
int cxxtools::LogConfiguration::rootFlags ( ) const
void cxxtools::LogConfiguration::setFile ( const std::string &  fname)
void cxxtools::LogConfiguration::setFile ( const std::string &  fname,
unsigned  maxfilesize,
unsigned  maxbackupindex 
)
void cxxtools::LogConfiguration::setLogFlags ( const std::string &  category,
int  flags 
)
void cxxtools::LogConfiguration::setLoghost ( const std::string &  host,
unsigned short  port,
bool  broadcast = false 
)
void cxxtools::LogConfiguration::setLogLevel ( const std::string &  category,
log_level_type  level 
)
inline
void cxxtools::LogConfiguration::setLogLevel ( const std::string &  category,
const std::string &  level 
)

Sets specific level using string notation.

See method strToLogFlags for syntax of string. Empty level removes the specific setting for the category.

void cxxtools::LogConfiguration::setRootFlags ( int  flags)
void cxxtools::LogConfiguration::setRootLevel ( log_level_type  level)
inline
void cxxtools::LogConfiguration::setRootLevel ( const std::string &  level)
inline

Sets root level using string notation.

See method strToLogFlags for syntax of string.

void cxxtools::LogConfiguration::setStderr ( )
void cxxtools::LogConfiguration::setStdout ( )
static int cxxtools::LogConfiguration::strToLogFlags ( const std::string &  level)
static

Converts a complex log level string to log_level_type.

Throws exception when level string could not be interpreted

accepted log levels:

everything below level: FATAL ERROR WARN INFO DEBUG FINE FINER FINEST TRACE

everything below level with trace enabled: TFATAL ... TFINE

specific log levels: TRACE|ERROR|WARN

just one log level: |WARN

Friends And Related Function Documentation

friend class Impl
friend

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