2#ifndef _LOGIT_LOG_STREAM_HPP_INCLUDED
3#define _LOGIT_LOG_STREAM_HPP_INCLUDED
29 const std::string& file,
31 const std::string& function,
32 const int& logger_index)
#define LOGIT_CURRENT_TIMESTAMP_MS()
Macro to get the current timestamp in milliseconds. If LOGIT_CURRENT_TIMESTAMP_MS is not defined,...
Defines the Logger class for managing multiple loggers and formatters.
A stream-based logger that collects log messages using the << operator.
LogStream & operator<<(const T &value)
Overloaded << operator to accumulate log content.
LogStream(const LogLevel &level, const std::string &file, const int &line, const std::string &function, const int &logger_index)
Constructor.
LogLevel m_level
Log level.
int m_logger_index
Logger index.
std::ostringstream m_stream
Stream for accumulating log content.
std::string m_file
Source file name.
std::string m_function
Function name.
~LogStream()
Destructor that logs the collected message when the object goes out of scope.
auto log_and_return(const LogRecord &record, Ts &&... args) -> decltype(std::forward_as_tuple(std::forward< Ts >(args)...))
Logs the message and returns a tuple of arguments.
static Logger & get_instance()
Retrieves the singleton instance of Logger.
The primary namespace for the LogIt++ library.
Utility functions for path manipulation, including relative path computation.
Stores log metadata and content.