31template <
typename Lock >
46 template<
typename Message_Builder >
53 template<
typename Message_Builder >
60 template<
typename Message_Builder >
67 template<
typename Message_Builder >
78 std::lock_guard< Lock > lock{
m_lock };
82 auto now = stdchrono::system_clock::now();
83 auto ms = stdchrono::duration_cast<
84 stdchrono::milliseconds >(
now.time_since_epoch() );
85 std::time_t
unix_time = stdchrono::duration_cast<
86 stdchrono::seconds >(
ms ).count();
91 "[{:%Y-%m-%d %H:%M:%S}.{:03d}] {}: {}" ),
93 static_cast< int >(
ms.count() % 1000u ),
ostream_logger_t(std::ostream &out) noexcept
void trace(Message_Builder &&msg_builder)
ostream_logger_t() noexcept
void info(Message_Builder &&msg_builder)
void log_message(const char *tag, const std::string &msg)
void error(Message_Builder &&msg_builder)
void warn(Message_Builder &&msg_builder)
ostream_logger_t & operator=(const ostream_logger_t &)=delete
ostream_logger_t(const ostream_logger_t &)=delete
A special wrapper around fmtlib include files.
#define RESTINIO_FMT_FORMAT_STRING(s)
run_on_this_thread_settings_t< Traits > on_this_thread()
A special marker for the case when http_server must be run on the context of the current thread.
Definition of null_mutex.
std::tm make_localtime(std::time_t t)