5 #ifndef BALL_COMMON_LOGSTREAM_H 6 #define BALL_COMMON_LOGSTREAM_H 10 #include <BALL/CONFIG/config.h> 12 #ifdef BALL_HAS_SYS_TIME_H 13 # include <sys/time.h> 16 #ifdef BALL_HAS_TIME_H 59 class LogStreamNotifier;
81 :
public std::streambuf
121 virtual void dump(std::ostream& s);
141 int sync(
bool force_flush);
147 virtual int overflow(
int c = -1);
161 min_level(MIN_LEVEL),
162 max_level(MAX_LEVEL),
193 string expandPrefix_(
const string& prefix,
int level,
Time time)
const;
221 virtual void logNotify();
245 :
public std::ostream
270 WARNING_LEVEL = 1000,
273 INFORMATION_LEVEL = 0
325 void setLevel(
int level);
400 void remove(std::ostream& s);
404 void insertNotification(std::ostream& s,
416 void setMinLevel(
const std::ostream& s,
int min_level);
425 void setMaxLevel(
const std::ostream& s,
int max_level);
445 void setPrefix(
const std::ostream& s,
const string& prefix);
448 void disableOutput() ;
451 void enableOutput() ;
454 bool outputEnabled()
const 459 std::ostream& flush();
481 Size getNumberOfLines
491 string getLineText(
const Index& index)
const;
497 Time getLineTime(
const Index& index)
const;
504 int getLineLevel(
const Index& index)
const;
514 list<int> filterLines
517 const string& s =
"")
const;
522 typedef std::list<LogStreamBuf::StreamStruct>::iterator StreamIterator;
524 StreamIterator findStream_(
const std::ostream& stream);
525 bool hasStream_(std::ostream& stream);
533 bool disable_output_;
545 # ifndef BALL_NO_INLINE_FUNCTIONS 546 # include <BALL/COMMON/logStream.iC> 551 #endif // BALL_COMMON_LOGSTREAM_H
BALL_EXPORT LogStream Log
LogStream * registered_at_
BALL_EXTERN_VARIABLE const double c
LogStreamNotifier * target
static const Time MAX_TIME
static const int MIN_LEVEL
std::stringstream stream_
list< StreamStruct > stream_list_
static const int MAX_LEVEL
vector< Logline > loglines_