ezEngine  Milestone 7
ezLogBlock Class Reference

Insert this line of code into a cpp file to enable VerboseDebugMessage calls. #define VerboseDebugMessage Debug. More...

#include <Log.h>

Public Member Functions

 ezLogBlock (const char *szName, const char *szContextInfo="")
 Creates a named grouping block for log messages. More...
 
 ezLogBlock (ezLogInterface *pInterface, const char *szName, const char *szContextInfo="")
 Creates a named grouping block for log messages. More...
 

Private Attributes

ezLogInterfacem_pLogInterface
 
ezInt32 m_iBlockDepth
 
ezLogBlockm_pParentBlock
 
const char * m_szName
 
const char * m_szContextInfo
 
bool m_bWritten
 

Friends

class ezLog
 

Detailed Description

Insert this line of code into a cpp file to enable VerboseDebugMessage calls. #define VerboseDebugMessage Debug.

Instances of this class will group messages in a scoped block together.

Constructor & Destructor Documentation

ezLogBlock::ezLogBlock ( const char *  szName,
const char *  szContextInfo = "" 
)

Creates a named grouping block for log messages.

Use the szContextInfo to pass in a string that can give additional context information (e.g. a file name). This string must point to valid memory until after the log block object is destroyed. Log writers get these strings provided through the ezLoggingEventData::m_szTag variable.

Note
The log block header (and context info) will not be printed until a message is successfully logged, i.e. as long as all messages in this block are filtered out (via the LogLevel setting), the log block header will not be printed, to prevent spamming the log.

This constructor will output the log block data to the ezGlobalLog.

ezLogBlock::ezLogBlock ( ezLogInterface pInterface,
const char *  szName,
const char *  szContextInfo = "" 
)

Creates a named grouping block for log messages.

This variant of the constructor takes an explicit ezLogInterface to write the log messages to.


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