libfly  6.2.2
C++20 utility library for Linux, macOS, and Windows
fly::logger::Log Struct Reference

#include <log.hpp>

Collaboration diagram for fly::logger::Log:

Public Member Functions

 Log ()=default
 
 Log (Trace &&trace, std::string &&message, std::uint32_t max_message_size) noexcept
 
 Log (Log &&log) noexcept
 
Logoperator= (Log &&log) noexcept
 

Public Attributes

std::uintmax_t m_index {0}
 
Level m_level {Level::NumLevels}
 
Trace m_trace {}
 
double m_time {-1.0}
 
std::string m_message
 

Friends

std::ostream & operator<< (std::ostream &stream, const Log &log)
 

Detailed Description

Struct to store data about single log. A log contains:

  1. The monotonically increasing index of the log.
  2. The log level.
  3. The time the log was made.
  4. Trace information about the log point (file name, function name, line number).
  5. The message being logged.
Author
Timothy Flynn (trfly.nosp@m.nn89.nosp@m.@pm.m.nosp@m.e)
Version
July 18, 2016

Constructor & Destructor Documentation

◆ Log() [1/3]

fly::logger::Log::Log ( )
default

Default constructor.

◆ Log() [2/3]

fly::logger::Log::Log ( Trace &&  trace,
std::string &&  message,
std::uint32_t  max_message_size 
)
noexcept

Constructor. Initialize with a message.

Parameters
traceThe trace information for the log point.
configReference to the logger config.
messageMessage to store.

◆ Log() [3/3]

fly::logger::Log::Log ( Log &&  log)
noexcept

Move constructor.

Member Function Documentation

◆ operator=()

Log & fly::logger::Log::operator= ( Log &&  log)
noexcept

Move assignment operator.


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