WvStreams
wvcrashlog.cc
1/*
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4 *
5 * A "Log Receiver" that puts the messages in the wvcrash_ring_buffer
6 */
7#include "wvcrashlog.h"
8#include "wvcrash.h"
9
10WvCrashLog::WvCrashLog(WvLog::LogLevel _max_level) :
11 WvLogRcv(_max_level)
12{
13}
14
15
16void WvCrashLog::_mid_line(const char *str, size_t len)
17{
18 wvcrash_ring_buffer_put(str, len);
19}
20
21
22void WvCrashLog::_make_prefix(time_t timenow)
23{
24 prefix = WvString("%s<%s>: ", last_source, loglevels[last_level]);
25 prelen = prefix.len();
26}
virtual void _mid_line(const char *str, size_t len)
add text to the current log line.
Definition wvcrashlog.cc:16
virtual void _make_prefix(time_t now_sec)
Set the Prefix and Prefix Length (size_t prelen)
Definition wvcrashlog.cc:22
WvLogRcv adds some intelligence to WvLogRcvBase, to keep track of line-prefix-printing and other form...
Definition wvlogrcv.h:29
WvString is an implementation of a simple and efficient printable-string class.
Definition wvstring.h:330