mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
1. moved factory to main namespace
2. common.h
This commit is contained in:
parent
a72de9d279
commit
8fbade29dc
27
include/c11log/common.h
Normal file
27
include/c11log/common.h
Normal file
@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
namespace c11log
|
||||
{
|
||||
|
||||
using log_clock = std::chrono::system_clock;
|
||||
namespace level
|
||||
{
|
||||
typedef enum
|
||||
{
|
||||
TRACE,
|
||||
DEBUG,
|
||||
INFO,
|
||||
WARNING,
|
||||
ERROR,
|
||||
CRITICAL,
|
||||
FATAL,
|
||||
NONE = 99
|
||||
} level_enum;
|
||||
|
||||
static const char* level_names[] { "trace", "debug", "info", "warning", "error", "critical", "fatal" };
|
||||
inline const char* to_str(c11log::level::level_enum l)
|
||||
{
|
||||
return level_names[l];
|
||||
}
|
||||
} //level
|
||||
} //c11log
|
Loading…
Reference in New Issue
Block a user