qpid::log::Logger Class Reference

Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Static Public Member Functions
qpid::log::Logger Class Reference

Central logging agent. More...

`#include <qpid/log/Logger.h>`

List of all members.

## Classes
class | Output
| Logging output sink. More...
## Public Types
enum | FormatFlag { FILE = 1, LINE = 2, FUNCTION = 4, LEVEL = 8, TIME = 16, THREAD = 32, HIRES = 64 }
| Flags indicating what to include in the log output. More...
## Public Member Functions
| Logger ()
| ~Logger ()
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 | reconfigure (const std::vector< std::string > &selectors)
| Reset the log selectors.
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.
QPID_COMMON_INLINE_EXTERN const Options & | getOptions () const
| Get the options used to configure the logger.
## Static Public Member Functions
static Logger & | instance ()

## 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.

## Member Enumeration Documentation

enum qpid::log::Logger::FormatFlag

Flags indicating what to include in the log output.

Enumerator:

  FILE |
  LINE |
  FUNCTION |
  LEVEL |
  TIME |
  THREAD |
  HIRES |

Definition at line 39 of file Logger.h.

## Constructor & Destructor Documentation

qpid::log::Logger::Logger | ( |  | ) |

qpid::log::Logger::~Logger | ( |  | ) |

## Member Function Documentation

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

Add a statement.

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

Reset the logger.

void qpid::log::Logger::configure | ( | const Options & | o | ) |

Configure logger from Options.

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.

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

Get the options used to configure the logger.

Definition at line 96 of file Logger.h.

static Logger& qpid::log::Logger::instance | ( |  | ) | `[static]`

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

Log a message.

void qpid::log::Logger::output | ( | std::auto_ptr< Output > | out | ) |

Add an output destination for messages.

void qpid::log::Logger::reconfigure | ( | const std::vector< std::string > & | selectors | ) |

Reset the log selectors.

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

Select the messages to be logged.

void qpid::log::Logger::setPrefix | ( | const std::string & | prefix | ) |

Set a prefix for all messages.

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

- qpid/log/Logger.h