aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2018-07-03 20:28:34 -0400
committerDeterminant <[email protected]>2018-07-03 20:28:34 -0400
commit9e89c3b330a8d7cc4fb256411b755c126ba37ec3 (patch)
tree5808c13078322e35bd7a3992122dad91c1125680 /src
parent2b956e784e740853a19ed8856f296a166a270e62 (diff)
...
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp10
1 files changed, 5 insertions, 5 deletions
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;