2014-01-25 04:09:04 -05:00
|
|
|
#pragma once
|
|
|
|
|
2014-02-21 15:51:54 -05:00
|
|
|
namespace c11log {
|
|
|
|
namespace level {
|
|
|
|
typedef enum {
|
|
|
|
DEBUG,
|
|
|
|
INFO,
|
|
|
|
WARNING,
|
|
|
|
ERROR,
|
|
|
|
FATAL,
|
|
|
|
NONE = 99
|
|
|
|
} level_enum;
|
|
|
|
const char* to_str(level_enum l);
|
|
|
|
}
|
2014-01-25 04:09:04 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
static const char* level_names[] { "Debug", "Info", "Warning", "Error", "Fatal" };
|
|
|
|
inline const char* c11log::level::to_str(c11log::level::level_enum l)
|
|
|
|
{
|
2014-02-21 15:51:54 -05:00
|
|
|
return level_names[l];
|
2014-01-25 04:09:04 -05:00
|
|
|
}
|