spdlog/include/c11log/common_types.h

30 lines
469 B
C++

#pragma once
#include <chrono>
namespace c11log
{
typedef std::chrono::system_clock log_clock;
namespace level
{
typedef enum {
DEBUG,
INFO,
WARNING,
ERROR,
FATAL,
NONE = 99
} level_enum;
const char* to_str(level_enum l);
}
}
static const char* level_names[] { "debug", "info", "warning", "error", "fatal" };
inline const char* c11log::level::to_str(c11log::level::level_enum l)
{
return level_names[l];
}