#include <XMLLogPrinter.h>
Public Member Functions | |
XMLLogPrinter () | |
Default constructor. | |
XMLLogPrinter (const RegistryKey &key) | |
Constructor. | |
Private Member Functions | |
std::tstring | DoFormatMessage (const LogInfo &logInfo, const CompositeLoggable &message) |
Private Attributes | |
XMLContentsPrinter | m_xmlContentsPrinter |
Example output of XMLLogPrinter:
<Debug timestamp="940789104" msg="42 TestLoggable123 vector<int> 3.1400000000000001 someString" origin="scopeLoggerName" function="function" file="file" line="123"> <int value="42"> <TestLoggable id="123"> <int field="someField1" value="154"> <TestLoggable2 field="someField2" id="abc"> <double field="doubleField" value="9.8699999999999992"> </TestLoggable2> <vector field="vectorField"> <basic_string value="firstString"> <basic_string value="secondString"> </vector> </TestLoggable> <vector> <int value="2"> <int value="5"> <int value="8"> </vector> <double value="3.1400000000000001"> <char value="someString"> </Debug>
Definition at line 133 of file XMLLogPrinter.h.
std::tstring DoFormatMessage | ( | const LogInfo & | logInfo, | |
const CompositeLoggable & | message | |||
) | [inline, private, virtual] |
This DoFormatMessage implementation formats populates the root node of XML output with the contents of logInfo structure, and then adds additional subnodes via m_xmlContentsPrinter. The root XMLNode printed onto a string is returned as a result.
Implements GenericLogPrinter< std::tstring >.
Definition at line 248 of file XMLLogPrinter.h.
References XMLNode::AddAttribute(), LogInfo::GetAbsoluteTimestamp(), LogInfo::GetFileName(), LogInfo::GetFunctionName(), LogInfo::GetLevel(), LogInfo::GetLineNumber(), LogInfo::GetScopeLoggerName(), Loggable::GetStringValue(), CompositeLoggable::LogContentsOn(), XMLNode::PrintOn(), and XMLContentsPrinter::SetRootXMLNode().