Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

WvLogBuffer Class Reference

#include <wvlogbuffer.h>

Inheritance diagram for WvLogBuffer:

WvLogRcv WvLogRcv WvLogRcvBase WvLogRcvBase WvLogRcvBase WvLogRcvBase List of all members.

Public Methods

 WvLogBuffer (int _max_lines, WvLog::LogLevel _max_level=WvLog::NUM_LOGLEVELS)
virtual ~WvLogBuffer ()
MsgListmessages ()
void dump (WvStream &s)
 DeclareWvList (Msg)
 WvLogBuffer (int _max_lines, WvLog::LogLevel _max_level=WvLog::NUM_LOGLEVELS)
virtual ~WvLogBuffer ()
MsgListmessages ()
void dump (WvStream &s)

Protected Methods

virtual void _begin_line ()
virtual void _mid_line (const char *str, size_t len)
virtual void _end_line ()
virtual void _begin_line ()
virtual void _mid_line (const char *str, size_t len)
virtual void _end_line ()

Protected Attributes

Msglastmsg
MsgList msgs
WvBuffer current
int max_lines
int numlines [WvLog::NUM_LOGLEVELS]
Msglastmsg

Detailed Description

WvLogBuffer is a descendant of WvLogRcv that buffers log messages for later use. It only keeps up to max_lines log entries of max_level debug level or lower.

Definition at line 15 of file include/wvlogbuffer.h.


Constructor & Destructor Documentation

WvLogBuffer::WvLogBuffer int    _max_lines,
WvLog::LogLevel    _max_level = WvLog::NUM_LOGLEVELS
 

Definition at line 20 of file wvlogbuffer.cc.

References lastmsg, WvLog::LogLevel, max_lines, and numlines.

WvLogBuffer::~WvLogBuffer   [virtual]
 

Definition at line 29 of file wvlogbuffer.cc.

References WvLogRcv::end_line.

WvLogBuffer::WvLogBuffer int    _max_lines,
WvLog::LogLevel    _max_level = WvLog::NUM_LOGLEVELS
 

virtual WvLogBuffer::~WvLogBuffer   [virtual]
 


Member Function Documentation

virtual void WvLogBuffer::_begin_line   [protected, virtual]
 

Start a new log line (print prefix)

Reimplemented from WvLogRcv.

void WvLogBuffer::_begin_line   [protected, virtual]
 

Start a new log line (print prefix)

Reimplemented from WvLogRcv.

Definition at line 35 of file wvlogbuffer.cc.

References WvLog::app, WvLogRcv::last_level, WvLogRcv::last_source, and lastmsg.

virtual void WvLogBuffer::_end_line   [protected, virtual]
 

End this (Guaranteed NonEmpty) log line

Reimplemented from WvLogRcv.

void WvLogBuffer::_end_line   [protected, virtual]
 

End this (Guaranteed NonEmpty) log line

Reimplemented from WvLogRcv.

Definition at line 47 of file wvlogbuffer.cc.

References WvList< Msg >::append, current, WvBuffer::get, lastmsg, WvLogBuffer::Msg::level, max_lines, WvLogBuffer::Msg::message, msgs, WvLog::NUM_LOGLEVELS, numlines, WvBuffer::put, trim_string, WvString::unique, and WvBuffer::used.

virtual void WvLogBuffer::_mid_line const char *    str,
size_t    len
[protected, virtual]
 

add text to the current log line. 'str' may contain only one '
' optional character at str[len-1] (the end); if it does, end_line will be called immediately after this function.

Implements WvLogRcv.

void WvLogBuffer::_mid_line const char *    str,
size_t    len
[protected, virtual]
 

add text to the current log line. 'str' may contain only one '
' optional character at str[len-1] (the end); if it does, end_line will be called immediately after this function.

Implements WvLogRcv.

Definition at line 41 of file wvlogbuffer.cc.

References current, and WvBuffer::put.

WvLogBuffer::DeclareWvList Msg   
 

void WvLogBuffer::dump WvStream   s
 

void WvLogBuffer::dump WvStream   s
 

Definition at line 86 of file wvlogbuffer.cc.

References WvLogRcv::loglevels, messages, and WvStream::print.

MsgList& WvLogBuffer::messages   [inline]
 

Definition at line 46 of file streams/wvlogbuffer.h.

References WvLogRcv::end_line, and msgs.

MsgList& WvLogBuffer::messages   [inline]
 

Definition at line 46 of file include/wvlogbuffer.h.

References WvLogRcv::end_line, and msgs.

Referenced by dump.


Member Data Documentation

WvBuffer WvLogBuffer::current [protected]
 

Definition at line 33 of file streams/wvlogbuffer.h.

Referenced by _end_line, and _mid_line.

Msg* WvLogBuffer::lastmsg [protected]
 

Definition at line 31 of file streams/wvlogbuffer.h.

Msg* WvLogBuffer::lastmsg [protected]
 

Definition at line 31 of file include/wvlogbuffer.h.

Referenced by _begin_line, _end_line, and WvLogBuffer.

int WvLogBuffer::max_lines [protected]
 

Definition at line 34 of file streams/wvlogbuffer.h.

Referenced by _end_line, and WvLogBuffer.

MsgList WvLogBuffer::msgs [protected]
 

Definition at line 32 of file streams/wvlogbuffer.h.

Referenced by _end_line, and messages.

int WvLogBuffer::numlines [protected]
 

Definition at line 35 of file streams/wvlogbuffer.h.

Referenced by _end_line, and WvLogBuffer.


The documentation for this class was generated from the following files:
Generated on Sun Aug 25 02:29:43 2002 for WvStreams by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002