Microsoft Information Protection SDK - C++ 1.17
API Reference Documentation for C++
Loading...
Searching...
No Matches
LoggerDelegate Class Referenceabstract

A class that defines the interface to the MIP SDK logger. More...

#include <logger_delegate.h>

Public Member Functions

virtual void Init (const std::string &storagePath)=0
 Initialize the logger.
 
virtual void Flush ()=0
 Flush the logger.
 
virtual void WriteToLog (const LogLevel level, const std::string &message, const std::string &function, const std::string &file, const int32_t line)=0
 Write a log statement to log file.
 
virtual void WriteToLogWithContext (const LogLevel level, const std::string &message, const std::string &function, const std::string &file, const int32_t line, const std::shared_ptr< void > &)
 Write a log statement to log file with a context. Override this function to handle the context.
 
virtual void WriteToLogWithLogMessage (const LogMessageData &logMessage)
 Write a log statement to a log.
 

Detailed Description

A class that defines the interface to the MIP SDK logger.

Member Function Documentation

◆ Flush()

virtual void LoggerDelegate::Flush ( )
pure virtual

Flush the logger.

◆ Init()

virtual void LoggerDelegate::Init ( const std::string & storagePath)
pure virtual

Initialize the logger.

Parameters
storagePaththe path to the location where persistent state, including logs, may be stored.

◆ WriteToLog()

virtual void LoggerDelegate::WriteToLog ( const LogLevel level,
const std::string & message,
const std::string & function,
const std::string & file,
const int32_t line )
pure virtual

Write a log statement to log file.

Parameters
levelthe log level for the log statement.
messagethe message for the log statement.
functionthe function name for the log statement.
filethe file name where log statement was generated.
linethe line number where the log statement was generated.

◆ WriteToLogWithContext()

virtual void LoggerDelegate::WriteToLogWithContext ( const LogLevel level,
const std::string & message,
const std::string & function,
const std::string & file,
const int32_t line,
const std::shared_ptr< void > &  )
inlinevirtual

Write a log statement to log file with a context. Override this function to handle the context.

Parameters
levelthe log level for the log statement.
messagethe message for the log statement.
functionthe function name for the log statement.
filethe file name where log statement was generated.
linethe line number where the log statement was generated.
contextClient context that was passed into the call that generated this log message

◆ WriteToLogWithLogMessage()

virtual void LoggerDelegate::WriteToLogWithLogMessage ( const LogMessageData & logMessage)
inlinevirtual

Write a log statement to a log.

Parameters
logMessageThe log message data containing the logging information

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