XII Release 0.1.0
Loading...
Searching...
No Matches
xiiLogBlock Class Reference

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

#include <Log.h>

Public Member Functions

 xiiLogBlock (xiiStringView sName, xiiStringView sContextInfo={})
 Creates a named grouping block for log messages.
 
 xiiLogBlock (xiiLogInterface *pInterface, xiiStringView sName, xiiStringView sContextInfo={})
 Creates a named grouping block for log messages.
 

Friends

class xiiLog
 

Detailed Description

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

Constructor & Destructor Documentation

◆ xiiLogBlock() [1/2]

xiiLogBlock::xiiLogBlock ( xiiStringView sName,
xiiStringView sContextInfo = {} )

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 xiiLoggingEventData::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 xiiGlobalLog.

◆ xiiLogBlock() [2/2]

xiiLogBlock::xiiLogBlock ( xiiLogInterface * pInterface,
xiiStringView sName,
xiiStringView sContextInfo = {} )

Creates a named grouping block for log messages.

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


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