logStream.h File Reference

Go to the source code of this file.

Classes

class  BALL::LogStreamBuf
struct  BALL::LogStreamBuf::StreamStruct
struct  BALL::LogStreamBuf::LoglineStruct
class  BALL::LogStreamNotifier
class  BALL::LogStream

Namespaces

namespace  BALL

Variables

Log streams

Logging, filtering, and storing messages. Many programs emit warning messages, error messages, or simply informations and remarks to their users. The LogStream class provides a convenient and straight-forward interface to classify these messages according to their importance (via the loglevel), filter and store them in files or write them to streams.

As the LogStream class is derived from ostream, it behaves as any ostream object. Additionally you may associate streams with each LogStream object that catch only messages of certain loglevels. So the user might decide to redirect all error messages to cerr, all warning messages to cout and all informations to a file.
Along with each message its time of creation and its loglevel is stored. So the user might also decide to store all errors he got in the last two hours or alike.
The LogStream class heavily relies on the LogStreamBuf class, which does the actual buffering and storing, but is only of interest if you want to implement a derived class, as the actual user interface is implemented in the LogStream class.
BALL_EXPORT LogStream BALL::Log
Generated by  doxygen 1.6.3