Lunchbox
1.15.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
|
This file contains logging classes. More...
#include <lunchbox/api.h>
#include <lunchbox/compiler.h>
#include <lunchbox/types.h>
#include <assert.h>
#include <iomanip>
#include <iostream>
#include <sstream>
Go to the source code of this file.
Classes | |
class | lunchbox::Log |
The logging class. More... | |
Namespaces | |
lunchbox | |
Abstraction layer and common utilities for multi-threaded programming. | |
Macros | |
#define | LBERROR |
Output an error message to the per-thread Log stream. More... | |
#define | LBWARN LBERROR |
#define | LBINFO |
Output an informational message to the per-thread Log. More... | |
#define | LBDEBUG |
Output a warning message to the per-thread Log stream. More... | |
#define | LBVERB |
Output a verbatim message to the per-thread Log stream. More... | |
#define | LBLOG(topic) |
Output a message pertaining to a topic to the per-thread Log stream. More... | |
#define | LBTHROW(exc) |
Log a std::exception if topic LOG_EXCEPTION is set before throwing exception. More... | |
Enumerations | |
enum | lunchbox::LogLevel { lunchbox::LOG_ERROR = 1, lunchbox::LOG_WARN = LOG_ERROR, lunchbox::LOG_INFO, lunchbox::LOG_DEBUG, lunchbox::LOG_VERB, LOG_ALL } |
The logging levels. More... | |
enum | lunchbox::LogTopic { lunchbox::LOG_EXCEPTION = 0x01, lunchbox::LOG_BUG = 0x04, lunchbox::LOG_CUSTOM = 0x10, lunchbox::LOG_ANY = 0xffffu } |
The logging topics. More... | |
Functions | |
std::ostream & | lunchbox::indent (std::ostream &os) |
Increases the indentation level of the Log stream, causing subsequent lines to be intended by four characters. More... | |
std::ostream & | lunchbox::exdent (std::ostream &os) |
Decrease the indentation level of the Log stream. More... | |
std::ostream & | lunchbox::disableFlush (std::ostream &os) |
Disable flushing of the Log stream. More... | |
std::ostream & | lunchbox::enableFlush (std::ostream &os) |
Re-enable flushing of the Log stream. More... | |
std::ostream & | lunchbox::forceFlush (std::ostream &os) |
Flush the Log stream regardless of the auto-flush state. More... | |
std::ostream & | lunchbox::disableHeader (std::ostream &os) |
Disable printing of the Log header for subsequent lines. More... | |
std::ostream & | lunchbox::enableHeader (std::ostream &os) |
Re-enable printing of the Log header. More... | |
std::ostream & | lunchbox::startBlock (std::ostream &os) |
Indent, disable flush and header for block printing. More... | |
std::ostream & | lunchbox::stopBlock (std::ostream &os) |
Exdent, denable flush and header to stop block print. More... | |
This file contains logging classes.
The macros LBERROR, LBINFO, LBDEBUG and LBVERB output messages at their respective logging level, if the level is active. They use a per-thread lunchbox::Log instance, which is a std::ostream. LBVERB is always inactive in release builds.
Definition in file log.h.
#define LBDEBUG |
Output a warning message to the per-thread Log stream.
#define LBERROR |
Output an error message to the per-thread Log stream.
Definition at line 187 of file log.h.
Referenced by lunchbox::PluginFactory< T >::load().
#define LBINFO |
Output an informational message to the per-thread Log.
Definition at line 192 of file log.h.
Referenced by lunchbox::PluginFactory< T >::load().
#define LBLOG | ( | topic | ) |
Output a message pertaining to a topic to the per-thread Log stream.
#define LBTHROW | ( | exc | ) |
Log a std::exception if topic LOG_EXCEPTION is set before throwing exception.
Definition at line 218 of file log.h.
Referenced by lunchbox::PluginFactory< T >::create(), and lunchbox::LFVector< T, nSlots >::getWriteLock().
#define LBVERB |
Output a verbatim message to the per-thread Log stream.
#define LBWARN LBERROR |