2#ifndef _LOGIT_LOG_STREAM_HPP_INCLUDED
3#define _LOGIT_LOG_STREAM_HPP_INCLUDED
29 const std::string& file,
31 const std::string& function,
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.
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 the message and returns a tuple of arguments.
static Logger & get_instance()
Retrieves the singleton instance of Logger.
#define LOGIT_CURRENT_TIMESTAMP_MS()
Macro to get the current timestamp in milliseconds. If LOGIT_CURRENT_TIMESTAMP_MS is not defined,...
The primary namespace for the LogIt++ library.
Utility functions for path manipulation, including relative path computation.
Stores log metadata and content.