qpid::log::Logger Class Reference

Central logging agent. More...

#include <Logger.h>

Collaboration diagram for qpid::log::Logger:

Collaboration graph
[legend]

List of all members.

Public Types

enum  FormatFlag {
  FILE = 1, LINE = 2, FUNCTION = 4, LEVEL = 8,
  TIME = 16, THREAD = 32
}
 Flags indicating what to include in the log output.

Public Member Functions

void select (const Selector &s)
 Select the messages to be logged.
void format (int formatFlags)
 Set the formatting flags, bitwise OR of FormatFlag values.
int format (const Options &)
 Set format flags from options object.
void configure (const Options &o, const std::string &progname)
 Configure logger from Options.
void add (Statement &s)
 Add a statement.
void log (const Statement &, const std::string &)
 Log a message.
void output (std::ostream &)
 Add an ostream to outputs.
void syslog (const std::string &programName)
 Add syslog to outputs.
void output (const std::string &name)
 Add an output.
void output (std::auto_ptr< Output > out)
 Add an output destination for messages.
void clear ()
 Reset the logger to it's original state.

Static Public Member Functions

static Loggerinstance ()

Classes

class  Output
 Interface for log output destination. More...


Detailed Description

Central logging agent.

Thread safe, singleton.


Member Function Documentation

void qpid::log::Logger::select ( const Selector s  ) 

Select the messages to be logged.

void qpid::log::Logger::format ( int  formatFlags  ) 

Set the formatting flags, bitwise OR of FormatFlag values.

int qpid::log::Logger::format ( const Options  ) 

Set format flags from options object.

Returns:
computed flags.

void qpid::log::Logger::add ( Statement s  ) 

Add a statement.

void qpid::log::Logger::log ( const Statement ,
const std::string &   
)

Log a message.

void qpid::log::Logger::output ( std::ostream &   ) 

Add an ostream to outputs.

The ostream must not be destroyed while the Logger might still be using it. This is the case for std streams cout, cerr, clog.

void qpid::log::Logger::syslog ( const std::string &  programName  ) 

Add syslog to outputs.

void qpid::log::Logger::output ( const std::string &  name  ) 

Add an output.

Parameters:
name a file name or one of the special tokens: stdout, stderr, syslog.

void qpid::log::Logger::clear (  ) 

Reset the logger to it's original state.


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

Generated on Thu May 15 22:24:45 2008 for Qpid by  doxygen 1.5.5