Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

WvSyslog Class Reference

#include <wvsyslog.h>

Inheritance diagram for WvSyslog:

Inheritance graph
[legend]
List of all members.

Detailed Description

WvSyslog is a descendant of WvLogRcv that sends messages to the syslogd daemon.


Public Member Functions

 WvSyslog (WvStringParm _prefix, bool _include_appname, WvLog::LogLevel _first_debug=WvLog::Debug, WvLog::LogLevel _max_level=WvLog::NUM_LOGLEVELS)
void end_line ()
WvLog::LogLevel level () const
void level (WvLog::LogLevel lvl)
bool set_custom_levels (WvString descr)

Static Public Attributes

static char * loglevels [WvLog::NUM_LOGLEVELS]

Protected Member Functions

virtual void _begin_line ()
 Start a new log line (print prefix).
virtual void _mid_line (const char *str, size_t len)
 add text to the current log line.
virtual void _end_line ()
 End this (Guaranteed NonEmpty) log line.
 DeclareWvScatterDict (Src_Lvl, WvString, src)
virtual void log (const WvLog *source, int loglevel, const char *_buf, size_t len)
virtual void _make_prefix ()
 Set the Prefix and Prefix Length (size_t prelen).

Protected Attributes

WvLog::LogLevel first_debug
WvDynBuf current
WvString syslog_prefix
bool include_appname
const WvLoglast_source
WvLog::LogLevel max_level
WvLog::LogLevel last_level
bool at_newline
WvString prefix
size_t prelen
Src_LvlDict custom_levels


Member Function Documentation

void WvSyslog::_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.


Member Data Documentation

char * WvLogRcv::loglevels [static, inherited]
 

Initial value:

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


The documentation for this class was generated from the following files:
Generated on Sun Jul 10 15:30:50 2005 for WvStreams by  doxygen 1.4.0