Plasma Engine  2.0
Loading...
Searching...
No Matches
plLogBlock Class Reference

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

#include <Log.h>

Public Member Functions

 plLogBlock (plStringView sName, plStringView sContextInfo={})
 Creates a named grouping block for log messages.
 
 plLogBlock (plLogInterface *pInterface, plStringView sName, plStringView sContextInfo={})
 Creates a named grouping block for log messages.
 

Friends

class plLog
 

Detailed Description

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

Constructor & Destructor Documentation

◆ plLogBlock() [1/2]

plLogBlock::plLogBlock ( plStringView sName,
plStringView 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 plLoggingEventData::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 plGlobalLog.

◆ plLogBlock() [2/2]

plLogBlock::plLogBlock ( plLogInterface * pInterface,
plStringView sName,
plStringView sContextInfo = {} )

Creates a named grouping block for log messages.

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


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