LogIt++
Loading...
Searching...
No Matches
logit::LogRecord Struct Reference

Stores log metadata and content. More...

#include <LogRecord.hpp>

Public Member Functions

 LogRecord (const LogLevel &log_level, const int64_t &timestamp_ms, const std::string &file, const int &line, const std::string &function, const std::string &format, const std::string &arg_names, const int &logger_index, const bool &print_mode)
 Constructor with argument names.
 

Public Attributes

const LogLevel log_level
 Log level (severity).
 
const int64_t timestamp_ms
 Timestamp in milliseconds.
 
const std::string file
 Source file name.
 
const int line
 Line number in the source file.
 
const std::string function
 Function name.
 
const std::string format
 Format string for the message.
 
const std::string arg_names
 Argument names for the log.
 
std::vector< VariableValueargs_array
 Argument values for the log.
 
std::thread::id thread_id
 ID of the logging thread.
 
const int logger_index
 Logger index (-1 to log to all).
 
const bool print_mode
 Flag to determine whether arguments are printed in a raw format without special symbols.
 

Detailed Description

Stores log metadata and content.

Definition at line 15 of file LogRecord.hpp.

Constructor & Destructor Documentation

◆ LogRecord()

logit::LogRecord::LogRecord ( const LogLevel & log_level,
const int64_t & timestamp_ms,
const std::string & file,
const int & line,
const std::string & function,
const std::string & format,
const std::string & arg_names,
const int & logger_index,
const bool & print_mode )
inline

Constructor with argument names.

Parameters
log_levelLog severity level.
timestamp_msTimestamp in milliseconds.
fileSource file name.
lineLine number.
functionFunction name.
formatFormat string for the log.
arg_namesNames of the log arguments.
logger_indexLogger index (-1 for all loggers).
print_modeFlag indicating if the log should print arguments in a raw format (true) or use formatted output (false).

Definition at line 38 of file LogRecord.hpp.

Member Data Documentation

◆ arg_names

const std::string logit::LogRecord::arg_names

Argument names for the log.

Definition at line 22 of file LogRecord.hpp.

◆ args_array

std::vector<VariableValue> logit::LogRecord::args_array

Argument values for the log.

Definition at line 23 of file LogRecord.hpp.

◆ file

const std::string logit::LogRecord::file

Source file name.

Definition at line 18 of file LogRecord.hpp.

◆ format

const std::string logit::LogRecord::format

Format string for the message.

Definition at line 21 of file LogRecord.hpp.

◆ function

const std::string logit::LogRecord::function

Function name.

Definition at line 20 of file LogRecord.hpp.

◆ line

const int logit::LogRecord::line

Line number in the source file.

Definition at line 19 of file LogRecord.hpp.

◆ log_level

const LogLevel logit::LogRecord::log_level

Log level (severity).

Definition at line 16 of file LogRecord.hpp.

◆ logger_index

const int logit::LogRecord::logger_index

Logger index (-1 to log to all).

Definition at line 25 of file LogRecord.hpp.

◆ print_mode

const bool logit::LogRecord::print_mode

Flag to determine whether arguments are printed in a raw format without special symbols.

Definition at line 26 of file LogRecord.hpp.

◆ thread_id

std::thread::id logit::LogRecord::thread_id

ID of the logging thread.

Definition at line 24 of file LogRecord.hpp.

◆ timestamp_ms

const int64_t logit::LogRecord::timestamp_ms

Timestamp in milliseconds.

Definition at line 17 of file LogRecord.hpp.


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