23 #include <momemta/impl/logger/common.h> 27 #include <sys/syscall.h> 37 inline log_clock::time_point now() {
38 return log_clock::now();
41 inline std::tm localtime(
const std::time_t& time_tt) {
43 localtime_r(&time_tt, &tm);
48 inline std::tm localtime() {
49 std::time_t now_t = time(
nullptr);
50 return localtime(now_t);
53 inline size_t thread_id() {
54 return static_cast<size_t>(syscall(SYS_gettid));
57 #if !defined (LOGGER_EOL) 58 #define LOGGER_EOL "\n" 61 constexpr
static const char* eol = LOGGER_EOL;
62 constexpr
static int eol_size =
sizeof(LOGGER_EOL) - 1;