diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-02-06 00:57:55 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-02-06 17:57:25 +0100 |
commit | 1b9151ab93467dd5508cc9c63b674310df0ab0b3 (patch) | |
tree | 11e62fae250894b6e61d580bf95eaf7014fc5fce /vespalog/src | |
parent | 65dcaa714247b95459495338f044e89446d9a986 (diff) |
Optimize includes.
Diffstat (limited to 'vespalog/src')
-rw-r--r-- | vespalog/src/vespa/log/log-assert.cpp | 6 | ||||
-rw-r--r-- | vespalog/src/vespa/log/log.cpp | 19 |
2 files changed, 5 insertions, 20 deletions
diff --git a/vespalog/src/vespa/log/log-assert.cpp b/vespalog/src/vespa/log/log-assert.cpp index 2c4106816a1..620a16b9737 100644 --- a/vespalog/src/vespa/log/log-assert.cpp +++ b/vespalog/src/vespa/log/log-assert.cpp @@ -1,10 +1,4 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <sys/types.h> -#include <cstring> -#include <cstdlib> -#include <cstdio> -#include <unistd.h> #include "log.h" LOG_SETUP(""); diff --git a/vespalog/src/vespa/log/log.cpp b/vespalog/src/vespa/log/log.cpp index 6ba386ba04d..7e92008504e 100644 --- a/vespalog/src/vespa/log/log.cpp +++ b/vespalog/src/vespa/log/log.cpp @@ -1,19 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <sys/types.h> -#include <cstring> -#include <cstdlib> -#include <stdarg.h> -#include <cstdio> -#include <sys/time.h> -#include <unistd.h> -#include <errno.h> -#include <memory> - -#include <algorithm> #include "log.h" LOG_SETUP_INDIRECT(".log", "$Id$"); + #undef LOG #define LOG LOG_INDIRECT @@ -22,6 +11,8 @@ LOG_SETUP_INDIRECT(".log", "$Id$"); #include "internal.h" #include "control-file.h" +#include <vespa/fastos/thread.h> + namespace ns_log { uint64_t Timer::getTimestamp() const { @@ -384,7 +375,7 @@ Logger::doEventProgress(const char *name, double value, double total) void Logger::doEventCount(const char *name, uint64_t value) { - doLog(event, "", 0, "count/1 name=\"%s\" value=%" PRIu64, name, value); + doLog(event, "", 0, "count/1 name=\"%s\" value=%lu", name, value); } void @@ -396,7 +387,7 @@ Logger::doEventValue(const char *name, double value) void Logger::doEventCollection(uint64_t collectionId, const char* name, const char* params) { - doLog(event, "", 0, "collection/1 collectionId=%" PRIu64 " name=\"%s\" %s", + doLog(event, "", 0, "collection/1 collectionId=%lu name=\"%s\" %s", collectionId, name, params); } |