Vault  4.1
Public Member Functions | Protected Member Functions
VStringVectorLogger Class Reference

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>

Inheritance diagram for VStringVectorLogger:
VNamedLogger

List of all members.

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 VStringVectorgetLines () 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).

Detailed Description

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.

Definition at line 1153 of file vlogger.h.


Member Function Documentation

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).

Parameters:
levelthe level of the message
filethe source file name where the message was logged (from __FILE__ symbol)
linethe line in the source file where the message was logged (from __LINE__ symbol)
emitMessagetrue if the message parameter is to be emitted
messagethe message to be emitted if emitMessage is true (the appenders typically format the message)
specifiedLoggerNameif not empty, the logger name supplied by caller
emitRawLinetrue if the rawLine parameter is to be emitted
rawLinethe 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().


The documentation for this class was generated from the following files:

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.