split logging into multiple classes with configurable levels

This commit is contained in:
Martin Michelsen
2022-06-26 22:53:11 -07:00
parent 47f97f357f
commit 6b958c9f25
26 changed files with 297 additions and 225 deletions
+3 -1
View File
@@ -9,6 +9,7 @@
#include <phosg/Network.hh>
#include <phosg/Time.hh>
#include "Loggers.hh"
#include "Version.hh"
using namespace std;
@@ -23,7 +24,8 @@ Client::Client(
struct bufferevent* bev,
GameVersion version,
ServerBehavior server_behavior)
: version(version),
: log("", client_log.min_level),
version(version),
bb_game_state(0),
flags(flags_for_version(this->version, 0)),
channel(bev, this->version, nullptr, nullptr, this, "", TerminalFormat::FG_YELLOW, TerminalFormat::FG_GREEN),