![]() |
Vault
4.1
|
A special logger subclass meant to be declared on the stack (not "registered") and explicitly logged to, which uses an embedded VStringVectorLogAppender to capture the emitted messages to a string list. More...
#include <vlogger.h>
Public Member Functions | |
VStringVectorLogger (const VString &name, int level, VStringVector *storage, bool formatOutput=VLogAppender::DO_FORMAT_OUTPUT, const VString &formatSpec=VString::EMPTY(), const VString &timeFormat=VString::EMPTY()) | |
virtual void | addInfo (VBentoNode &infoNode) const |
For diagnostic purposes, adds the properties/state of this logger to the supplied Bento node. | |
const VStringVector & | getLines () const |
Protected Member Functions | |
virtual void | _emitToAppenders (int level, const char *file, int line, bool emitMessage, const VString &message, const VString &specifiedLoggerName, bool emitRawLine, const VString &rawLine) |
Emits the specified message and/or raw line to all appenders appropriate to this logger (see class-level doc for VNamedLogger). |
A special logger subclass meant to be declared on the stack (not "registered") and explicitly logged to, which uses an embedded VStringVectorLogAppender to capture the emitted messages to a string list.
void VStringVectorLogger::addInfo | ( | VBentoNode & | infoNode | ) | const [virtual] |
For diagnostic purposes, adds the properties/state of this logger to the supplied Bento node.
Calls _addInfo which a subclass should override to change the type value. Subclasses should call inherited and then add their type-specific info.
Reimplemented from VNamedLogger.
Definition at line 1268 of file vlogger.cpp.
References VBentoNode::addString().
void VStringVectorLogger::_emitToAppenders | ( | int | level, |
const char * | file, | ||
int | line, | ||
bool | emitMessage, | ||
const VString & | message, | ||
const VString & | specifiedLoggerName, | ||
bool | emitRawLine, | ||
const VString & | rawLine | ||
) | [protected, virtual] |
Emits the specified message and/or raw line to all appenders appropriate to this logger (see class-level doc for VNamedLogger).
level | the level of the message |
file | the source file name where the message was logged (from __FILE__ symbol) |
line | the line in the source file where the message was logged (from __LINE__ symbol) |
emitMessage | true if the message parameter is to be emitted |
message | the message to be emitted if emitMessage is true (the appenders typically format the message) |
specifiedLoggerName | if not empty, the logger name supplied by caller |
emitRawLine | true if the rawLine parameter is to be emitted |
rawLine | the raw line to be emitted if emitRawLine is true (the appenders should not format the raw line) |
Reimplemented from VNamedLogger.
Definition at line 1273 of file vlogger.cpp.
References VLogAppender::emit(), and VNamedLogger::getName().