Microsoft Information Protection (MIP) SDK for C++: Reference 1.16
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
LogMessageData Class Reference

A class that stores log messages. More...

#include <src/api/mip/log_message_data.h>

Collaboration diagram for LogMessageData:

Public Member Functions

const std::shared_ptr< void > & GetContext () const
 The logger context for the log statement.
 
const std::string & GetFile () const
 The file name for the log statement.
 
const std::string & GetFunction () const
 The function name for the log statement.
 
LogLevel GetLevel () const
 The log level for the log statement.
 
int32_t GetLine () const
 The line number for the log statement.
 
const std::string & GetLogMessage () const
 The message for the log statement.
 
std::thread::id GetMessageThreadId () const
 The thread id of the log statement.
 
std::chrono::time_point< std::chrono::system_clock > GetMessageTime () const
 The message time of the log statement.
 
 LogMessageData (const LogLevel level, const std::string &message, const std::string &function, const std::string &file, int32_t line, const std::shared_ptr< void > &context, std::chrono::time_point< std::chrono::system_clock > messageTime, std::thread::id messageThreadId)
 

Private Attributes

std::shared_ptr< void > mContext
 
std::string mFile
 
std::string mFunction
 
LogLevel mLevel
 
int32_t mLine
 
std::string mLogMessage
 
std::thread::id mMessageThreadId
 
std::chrono::time_point< std::chrono::system_clock > mMessageTime
 

Detailed Description

A class that stores log messages.

Definition at line 58 of file log_message_data.h.

Constructor & Destructor Documentation

◆ LogMessageData()

LogMessageData::LogMessageData ( const LogLevel level,
const std::string & message,
const std::string & function,
const std::string & file,
int32_t line,
const std::shared_ptr< void > & context,
std::chrono::time_point< std::chrono::system_clock > messageTime,
std::thread::id messageThreadId )
inline

Definition at line 60 of file log_message_data.h.

69 : mLevel(level),
70 mLogMessage(message),
71 mFunction(function),
72 mFile(file),
73 mLine(line),
74 mContext(context),
75 mMessageTime(messageTime),
76 mMessageThreadId(messageThreadId) {
77 }
std::thread::id mMessageThreadId
std::string mFunction
std::string mLogMessage
std::chrono::time_point< std::chrono::system_clock > mMessageTime
std::shared_ptr< void > mContext

Member Function Documentation

◆ GetContext()

const std::shared_ptr< void > & LogMessageData::GetContext ( ) const
inline

The logger context for the log statement.

Definition at line 107 of file log_message_data.h.

107{ return mContext; }

References mContext.

Referenced by LoggerDelegate::WriteToLogWithLogMessage().

◆ GetFile()

const std::string & LogMessageData::GetFile ( ) const
inline

The file name for the log statement.

Definition at line 97 of file log_message_data.h.

97{ return mFile; }

References mFile.

Referenced by LoggerDelegate::WriteToLogWithLogMessage().

◆ GetFunction()

const std::string & LogMessageData::GetFunction ( ) const
inline

The function name for the log statement.

Definition at line 92 of file log_message_data.h.

92{ return mFunction; }

References mFunction.

Referenced by LoggerDelegate::WriteToLogWithLogMessage().

◆ GetLevel()

LogLevel LogMessageData::GetLevel ( ) const
inline

The log level for the log statement.

Definition at line 82 of file log_message_data.h.

82{ return mLevel; }

References mLevel.

Referenced by LoggerDelegate::WriteToLogWithLogMessage().

◆ GetLine()

int32_t LogMessageData::GetLine ( ) const
inline

The line number for the log statement.

Definition at line 102 of file log_message_data.h.

102{ return mLine; }

References mLine.

Referenced by LoggerDelegate::WriteToLogWithLogMessage().

◆ GetLogMessage()

const std::string & LogMessageData::GetLogMessage ( ) const
inline

The message for the log statement.

Definition at line 87 of file log_message_data.h.

87{ return mLogMessage; }

References mLogMessage.

Referenced by LoggerDelegate::WriteToLogWithLogMessage().

◆ GetMessageThreadId()

std::thread::id LogMessageData::GetMessageThreadId ( ) const
inline

The thread id of the log statement.

Definition at line 117 of file log_message_data.h.

117{ return mMessageThreadId; }

References mMessageThreadId.

◆ GetMessageTime()

std::chrono::time_point< std::chrono::system_clock > LogMessageData::GetMessageTime ( ) const
inline

The message time of the log statement.

Definition at line 112 of file log_message_data.h.

112{ return mMessageTime; }

References mMessageTime.

Member Data Documentation

◆ mContext

std::shared_ptr<void> LogMessageData::mContext
private

Definition at line 125 of file log_message_data.h.

Referenced by GetContext().

◆ mFile

std::string LogMessageData::mFile
private

Definition at line 123 of file log_message_data.h.

Referenced by GetFile().

◆ mFunction

std::string LogMessageData::mFunction
private

Definition at line 122 of file log_message_data.h.

Referenced by GetFunction().

◆ mLevel

LogLevel LogMessageData::mLevel
private

Definition at line 120 of file log_message_data.h.

Referenced by GetLevel().

◆ mLine

int32_t LogMessageData::mLine
private

Definition at line 124 of file log_message_data.h.

Referenced by GetLine().

◆ mLogMessage

std::string LogMessageData::mLogMessage
private

Definition at line 121 of file log_message_data.h.

Referenced by GetLogMessage().

◆ mMessageThreadId

std::thread::id LogMessageData::mMessageThreadId
private

Definition at line 127 of file log_message_data.h.

Referenced by GetMessageThreadId().

◆ mMessageTime

std::chrono::time_point<std::chrono::system_clock> LogMessageData::mMessageTime
private

Definition at line 126 of file log_message_data.h.

Referenced by GetMessageTime().


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