From 6e4d46f8cf911b82a10e8cd25b65fcc421bbc712 Mon Sep 17 00:00:00 2001 From: Aleksi Lindeman <0xdec05eba@gmail.com> Date: Sat, 14 Apr 2018 19:45:15 +0200 Subject: Store database storage to files, also loading --- src/Log.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/Log.cpp') diff --git a/src/Log.cpp b/src/Log.cpp index 9c06a62..0bdc0a6 100644 --- a/src/Log.cpp +++ b/src/Log.cpp @@ -2,15 +2,14 @@ #include #include -static std::mutex mutexDebug; - namespace odhtdb { // TODO: Add color (if output is tty)? + static std::mutex mutexLog; void Log::debug(const char *fmt, ...) { - std::lock_guard lock(mutexDebug); + std::lock_guard lock(mutexLog); va_list args; va_start(args, fmt); fputs("Debug: ", stdout); @@ -21,7 +20,7 @@ namespace odhtdb void Log::warn(const char *fmt, ...) { - std::lock_guard lock(mutexDebug); + std::lock_guard lock(mutexLog); va_list args; va_start(args, fmt); fputs("Warning: ", stdout); @@ -32,7 +31,7 @@ namespace odhtdb void Log::error(const char *fmt, ...) { - std::lock_guard lock(mutexDebug); + std::lock_guard lock(mutexLog); va_list args; va_start(args, fmt); fputs("Error: ", stderr); -- cgit v1.2.3