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

WvLogRcv Class Reference

#include <wvlogrcv.h>

Inheritance diagram for WvLogRcv:

WvLogRcvBase WvLogRcvBase WvLogBuffer WvLogBuffer WvLogConsole WvLogConsole WvSyslog WvSyslog List of all members.

Public Methods

 WvLogRcv (WvLog::LogLevel _max_level=WvLog::NUM_LOGLEVELS)
virtual ~WvLogRcv ()
void end_line ()
WvLog::LogLevel level () const
void level (WvLog::LogLevel lvl)
 WvLogRcv (WvLog::LogLevel _max_level=WvLog::NUM_LOGLEVELS)
virtual ~WvLogRcv ()
void end_line ()
WvLog::LogLevel level () const
void level (WvLog::LogLevel lvl)

Static Public Attributes

char * loglevels [WvLog::NUM_LOGLEVELS]
char * loglevels [WvLog::NUM_LOGLEVELS]

Protected Methods

virtual void log (const WvLog *source, int loglevel, const char *_buf, size_t len)
virtual void _make_prefix ()
virtual void _begin_line ()
virtual void _end_line ()
virtual void _mid_line (const char *str, size_t len)=0
virtual void log (const WvLog *source, int loglevel, const char *_buf, size_t len)
virtual void _make_prefix ()
virtual void _begin_line ()
virtual void _end_line ()
virtual void _mid_line (const char *str, size_t len)=0

Protected Attributes

const WvLoglast_source
WvLog::LogLevel max_level
WvLog::LogLevel last_level
bool at_newline
WvString prefix
size_t prelen
const WvLoglast_source

Private Methods

void begin_line ()
void mid_line (const char *str, size_t len)
void begin_line ()
void mid_line (const char *str, size_t len)

Detailed Description

WvLogRcv adds some intelligence to WvLogRcvBase, to keep track of line-prefix-printing and other formatting information.

Definition at line 26 of file include/wvlogrcv.h.


Constructor & Destructor Documentation

WvLogRcv::WvLogRcv WvLog::LogLevel    _max_level = WvLog::NUM_LOGLEVELS
 

Definition at line 135 of file wvlog.cc.

References at_newline, last_level, last_source, WvLog::LogLevel, max_level, and WvLog::NUM_LOGLEVELS.

WvLogRcv::~WvLogRcv   [virtual]
 

Definition at line 144 of file wvlog.cc.

WvLogRcv::WvLogRcv WvLog::LogLevel    _max_level = WvLog::NUM_LOGLEVELS
 

virtual WvLogRcv::~WvLogRcv   [virtual]
 


Member Function Documentation

virtual void WvLogRcv::_begin_line   [protected, virtual]
 

Start a new log line (print prefix)

Reimplemented in WvLogBuffer, WvSyslog, WvLogBuffer, and WvSyslog.

void WvLogRcv::_begin_line   [protected, virtual]
 

Start a new log line (print prefix)

Reimplemented in WvLogBuffer, WvSyslog, WvLogBuffer, and WvSyslog.

Definition at line 157 of file wvlog.cc.

References mid_line(), prefix, and prelen.

Referenced by begin_line().

virtual void WvLogRcv::_end_line   [protected, virtual]
 

End this (Guaranteed NonEmpty) log line

Reimplemented in WvLogBuffer, WvSyslog, WvLogBuffer, and WvSyslog.

void WvLogRcv::_end_line   [protected, virtual]
 

End this (Guaranteed NonEmpty) log line

Reimplemented in WvLogBuffer, WvSyslog, WvLogBuffer, and WvSyslog.

Definition at line 163 of file wvlog.cc.

Referenced by end_line().

virtual void WvLogRcv::_make_prefix   [protected, virtual]
 

Set the Prefix and Prefix Length (size_t prelen)

void WvLogRcv::_make_prefix   [protected, virtual]
 

Set the Prefix and Prefix Length (size_t prelen)

Definition at line 149 of file wvlog.cc.

References WvLogRcvBase::appname(), last_level, last_source, loglevels, prefix, and prelen.

Referenced by log().

virtual void WvLogRcv::_mid_line const char *    str,
size_t    len
[protected, pure 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.

Implemented in WvLogBuffer, WvLogConsole, WvSyslog, WvLogBuffer, WvLogConsole, and WvSyslog.

virtual void WvLogRcv::_mid_line const char *    str,
size_t    len
[protected, pure 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.

Implemented in WvLogBuffer, WvLogConsole, WvSyslog, WvLogBuffer, WvLogConsole, and WvSyslog.

Referenced by end_line(), and mid_line().

void WvLogRcv::begin_line   [inline, private]
 

Definition at line 61 of file streams/wvlogrcv.h.

References _begin_line(), and at_newline.

void WvLogRcv::begin_line   [inline, private]
 

Definition at line 61 of file include/wvlogrcv.h.

References _begin_line(), and at_newline.

Referenced by log().

void WvLogRcv::end_line   [inline]
 

Definition at line 73 of file streams/wvlogrcv.h.

References _end_line(), _mid_line(), and at_newline.

void WvLogRcv::end_line   [inline]
 

Definition at line 73 of file include/wvlogrcv.h.

References _end_line(), _mid_line(), and at_newline.

Referenced by log(), WvLogBuffer::messages(), WvLogBuffer::~WvLogBuffer(), WvLogConsole::~WvLogConsole(), and WvSyslog::~WvSyslog().

void WvLogRcv::level WvLog::LogLevel    lvl [inline]
 

Definition at line 79 of file streams/wvlogrcv.h.

References WvLog::LogLevel, and max_level.

WvLog::LogLevel WvLogRcv::level   const [inline]
 

Definition at line 77 of file streams/wvlogrcv.h.

References WvLog::LogLevel, and max_level.

void WvLogRcv::level WvLog::LogLevel    lvl [inline]
 

Definition at line 79 of file include/wvlogrcv.h.

References WvLog::LogLevel, and max_level.

WvLog::LogLevel WvLogRcv::level   const [inline]
 

Definition at line 77 of file include/wvlogrcv.h.

References WvLog::LogLevel, and max_level.

virtual void WvLogRcv::log const WvLog   source,
int    loglevel,
const char *    _buf,
size_t    len
[protected, virtual]
 

Implements WvLogRcvBase.

void WvLogRcv::log const WvLog   source,
int    loglevel,
const char *    _buf,
size_t    len
[protected, virtual]
 

Implements WvLogRcvBase.

Definition at line 169 of file wvlog.cc.

References _make_prefix(), begin_line(), end_line(), last_level, last_source, WvLog::LogLevel, max_level, and mid_line().

void WvLogRcv::mid_line const char *    str,
size_t    len
[inline, private]
 

Definition at line 63 of file streams/wvlogrcv.h.

References _mid_line(), and at_newline.

void WvLogRcv::mid_line const char *    str,
size_t    len
[inline, private]
 

Definition at line 63 of file include/wvlogrcv.h.

References _mid_line(), and at_newline.

Referenced by _begin_line(), and log().


Member Data Documentation

bool WvLogRcv::at_newline [protected]
 

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

Referenced by begin_line(), end_line(), mid_line(), and WvLogRcv().

WvLog::LogLevel WvLogRcv::last_level [protected]
 

Definition at line 30 of file streams/wvlogrcv.h.

Referenced by WvLogBuffer::_begin_line(), WvSyslog::_end_line(), _make_prefix(), log(), and WvLogRcv().

const WvLog* WvLogRcv::last_source [protected]
 

Definition at line 29 of file streams/wvlogrcv.h.

const WvLog* WvLogRcv::last_source [protected]
 

Definition at line 29 of file include/wvlogrcv.h.

Referenced by WvLogBuffer::_begin_line(), _make_prefix(), log(), and WvLogRcv().

char* WvLogRcv::loglevels[WvLog::NUM_LOGLEVELS] [static]
 

Definition at line 68 of file streams/wvlogrcv.h.

char * WvLogRcv::loglevels [static]
 

Initial value:

 {
    "Crit",
    "Err",
    "Warn",
    "Notice",
    "Info",
    "*1",
    "*2",
    "*3",
    "*4",
    "*5",
}

Definition at line 16 of file wvlog.cc.

Referenced by _make_prefix(), and WvLogBuffer::dump().

WvLog::LogLevel WvLogRcv::max_level [protected]
 

Definition at line 30 of file streams/wvlogrcv.h.

Referenced by level(), log(), and WvLogRcv().

WvString WvLogRcv::prefix [protected]
 

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

Referenced by WvSyslog::_begin_line(), _begin_line(), and _make_prefix().

size_t WvLogRcv::prelen [protected]
 

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

Referenced by WvSyslog::_begin_line(), _begin_line(), and _make_prefix().


The documentation for this class was generated from the following files:
Generated on Sat Aug 24 21:37:06 2002 for WvStreams by doxygen1.2.15