From 9e89c3b330a8d7cc4fb256411b755c126ba37ec3 Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 3 Jul 2018 20:28:34 -0400 Subject: ... --- src/util.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/util.cpp b/src/util.cpp index 9a24a8c..9ea3b83 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -85,7 +85,7 @@ SalticidaeError::operator std::string() const { } void Logger::write(const char *tag, const char *fmt, va_list ap) { - fprintf(output, "%s [%s] ", get_current_datetime().c_str(), tag); + fprintf(output, "%s [%s %s] ", get_current_datetime().c_str(), prefix, tag); vfprintf(output, fmt, ap); fprintf(output, "\n"); } @@ -100,24 +100,24 @@ void Logger::debug(const char *fmt, ...) { void Logger::info(const char *fmt, ...) { va_list ap; va_start(ap, fmt); - write("salticidae info", fmt, ap); + write("info", fmt, ap); va_end(ap); } void Logger::warning(const char *fmt, ...) { va_list ap; va_start(ap, fmt); - write("salticidae warn", fmt, ap); + write("warn", fmt, ap); va_end(ap); } void Logger::error(const char *fmt, ...) { va_list ap; va_start(ap, fmt); - write("salticida error", fmt, ap); + write("error", fmt, ap); va_end(ap); } -Logger logger; +Logger logger("salticidae"); void ElapsedTime::start() { struct timezone tz; -- cgit v1.2.3-70-g09d2