summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-12-04 19:26:34 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2016-12-12 02:55:45 +0100
commitf94a9a21d6d546868ef2cf63ea3532469450ffd7 (patch)
tree7174466dc53a7009eb425d4c2fc7b5202e112542 /vespalib
parentd1fc3e5707851697bfe9a07b40f1b8e3672be8aa (diff)
Split out so documentprotocol.h does not pull in everything.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/trace/trace.cpp11
-rw-r--r--vespalib/src/vespa/vespalib/trace/trace.h1
2 files changed, 6 insertions, 6 deletions
diff --git a/vespalib/src/vespa/vespalib/trace/trace.cpp b/vespalib/src/vespa/vespalib/trace/trace.cpp
index 018fd11ddbc..2dbf3b32e7e 100644
--- a/vespalib/src/vespa/vespalib/trace/trace.cpp
+++ b/vespalib/src/vespa/vespalib/trace/trace.cpp
@@ -1,10 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/trace/trace.h>
-
-#include <algorithm>
-#include <vespa/fastos/fastos.h>
-#include <vespa/vespalib/util/vstringfmt.h>
+#include <vespa/vespalib/util/stringfmt.h>
+#include <sys/time.h>
namespace vespalib {
@@ -22,6 +20,8 @@ Trace::Trace(uint32_t level) :
// empty
}
+Trace::~Trace() { }
+
Trace &
Trace::clear()
{
@@ -54,8 +54,7 @@ Trace::trace(uint32_t level, const string &note, bool addTime)
if (addTime) {
struct timeval tv;
gettimeofday(&tv, NULL);
- _root.addChild(vespalib::make_vespa_string(
- "[%ld.%06ld] %s", tv.tv_sec, tv.tv_usec, note.c_str()));
+ _root.addChild(make_string("[%ld.%06ld] %s", tv.tv_sec, tv.tv_usec, note.c_str()));
} else {
_root.addChild(note);
}
diff --git a/vespalib/src/vespa/vespalib/trace/trace.h b/vespalib/src/vespa/vespalib/trace/trace.h
index 493f2b931b7..a2dd07306fd 100644
--- a/vespalib/src/vespa/vespalib/trace/trace.h
+++ b/vespalib/src/vespa/vespalib/trace/trace.h
@@ -28,6 +28,7 @@ public:
* Create an empty Trace with level set to 0 (no tracing)
*/
Trace();
+ ~Trace();
/**
* Create an empty trace with given level.