From 8fbade29dc95c6e83afa6b5c3705b9d9655b5ace Mon Sep 17 00:00:00 2001 From: gabi Date: Fri, 10 Oct 2014 21:37:33 +0300 Subject: [PATCH] 1. moved factory to main namespace 2. common.h --- include/c11log/common.h | 27 ++++++++++++++++++++++++++ include/c11log/{details => }/factory.h | 0 2 files changed, 27 insertions(+) create mode 100644 include/c11log/common.h rename include/c11log/{details => }/factory.h (100%) diff --git a/include/c11log/common.h b/include/c11log/common.h new file mode 100644 index 00000000..a33730f7 --- /dev/null +++ b/include/c11log/common.h @@ -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 diff --git a/include/c11log/details/factory.h b/include/c11log/factory.h similarity index 100% rename from include/c11log/details/factory.h rename to include/c11log/factory.h