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)
 Configure logger from Options.
void add (Statement &s)
 Add a statement.
void log (const Statement &, const std::string &)
 Log a message.
void output (std::auto_ptr< Output > out)
 Add an output destination for messages.
void setPrefix (const std::string &prefix)
 Set a prefix for all messages.
void clear ()
 Reset the logger.
const OptionsgetOptions () const
 Get the options used to configure the logger.

Static Public Member Functions

static Loggerinstance ()

Classes

class  Output
 Logging output sink. More...


Detailed Description

Central logging agent.

Thread safe, singleton.

The Logger provides all needed functionality for selecting and formatting logging output. The actual outputting of log records is handled by Logger::Output-derived classes instantiated by the platform's sink-related options.

Definition at line 35 of file Logger.h.


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::clear (  ) 

Reset the logger.

const Options& qpid::log::Logger::getOptions (  )  const [inline]

Get the options used to configure the logger.

Definition at line 92 of file Logger.h.


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

Generated on Thu Oct 16 13:38:37 2008 for Qpid by  doxygen 1.5.6