BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Namespaces
logStream.h File Reference
#include <BALL/CONFIG/config.h>
#include <BALL/COMMON/global.h>
#include <BALL/COMMON/debug.h>
#include <strstream>
#include <iostream>
#include <list>
#include <vector>
#include <string>
#include <BALL/COMMON/logStream.iC>

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

 BALL
 -*- Mode: C++; tab-width: 2; -*-
 

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