2#ifndef LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_DETAIL_LOGSTREAM_HPP_INCLUDED
3#define LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_DETAIL_LOGSTREAM_HPP_INCLUDED
28 const std::string& file,
30 const std::string& function,
A stream-based logger that collects log messages using the << operator.
LogStream & operator<<(const T &value)
Overloaded << operator to accumulate log content.
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.
LogStream & operator<<(std::ostream &(*manip)(std::ostream &))
LogStream(LogLevel level, const std::string &file, int line, const std::string &function, int logger_index)
Constructor.
auto log_and_return(const LogRecord &record, Ts &&... args) -> decltype(std::forward_as_tuple(std::forward< Ts >(args)...))
Logs message and returns tuple of arguments.
static Logger & get_instance()
Retrieves singleton instance of Logger.
#define LOGIT_CURRENT_TIMESTAMP_MS()
Macro to get the current timestamp in milliseconds.
The primary namespace for the LogIt++ library.
Stores log metadata and content.