spdlog/include/c11log/common_types.h

29 lines
418 B
C
Raw Normal View History

2014-03-02 08:59:18 -05:00
#pragma once
#include <chrono>
2014-03-06 17:52:50 -05:00
namespace c11log
{
2014-03-02 08:59:18 -05:00
typedef std::chrono::system_clock log_clock;
2014-03-06 17:52:50 -05:00
namespace level
{
typedef enum
{
2014-03-02 08:59:18 -05:00
DEBUG,
INFO,
WARNING,
ERROR,
FATAL,
NONE = 99
} level_enum;
static const char* level_names[] { "debug", "info", "warning", "error", "fatal" };
inline const char* to_str(c11log::level::level_enum l)
2014-03-02 08:59:18 -05:00
{
return level_names[l];
}
}
}