fixed macros and other stuff for the no-streams branch

This commit is contained in:
gabime
2016-07-09 00:46:00 +03:00
parent 7885aa478c
commit 7ddfb2b877
8 changed files with 44 additions and 86 deletions

View File

@@ -72,15 +72,12 @@ protected:
inline ansicolor_sink::ansicolor_sink(sink_ptr wrapped_sink) : sink_(wrapped_sink)
{
colors_[level::trace] = cyan;
colors_[level::debug] = cyan;
colors_[level::info] = white;
colors_[level::notice] = bold + white;
colors_[level::warn] = bold + yellow;
colors_[level::err] = red;
colors_[level::critical] = bold + red;
colors_[level::alert] = bold + white + on_red;
colors_[level::emerg] = bold + yellow + on_red;
colors_[level::trace] = cyan;
colors_[level::debug] = cyan;
colors_[level::info] = bold;
colors_[level::warn] = yellow + bold;
colors_[level::err] = red + bold;
colors_[level::critical] = bold + on_red;
colors_[level::off] = reset;
}

View File

@@ -35,12 +35,9 @@ public:
_priorities[static_cast<int>(level::trace)] = LOG_DEBUG;
_priorities[static_cast<int>(level::debug)] = LOG_DEBUG;
_priorities[static_cast<int>(level::info)] = LOG_INFO;
_priorities[static_cast<int>(level::notice)] = LOG_NOTICE;
_priorities[static_cast<int>(level::warn)] = LOG_WARNING;
_priorities[static_cast<int>(level::err)] = LOG_ERR;
_priorities[static_cast<int>(level::critical)] = LOG_CRIT;
_priorities[static_cast<int>(level::alert)] = LOG_ALERT;
_priorities[static_cast<int>(level::emerg)] = LOG_EMERG;
_priorities[static_cast<int>(level::off)] = LOG_INFO;
//set ident to be program name if empty
@@ -65,7 +62,7 @@ public:
private:
std::array<int, 10> _priorities;
std::array<int, 7> _priorities;
//must store the ident because the man says openlog might use the pointer as is and not a string copy
const std::string _ident;