summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-06-06 22:13:24 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-06-07 09:50:24 +0200
commit777943d3194383ab5492b285ae83dc3e92328514 (patch)
tree3a98819d239df0f943056f9196170351385a34f3
parent0b37a1b9eecf9b38310bde4a11c01a7962234450 (diff)
Do not provide unnecessary fastos/mutex.h by default.
-rw-r--r--config/src/vespa/config/set/configsetsource.cpp5
-rw-r--r--document/src/vespa/document/datatype/structdatatype.cpp1
-rw-r--r--filedistribution/src/vespa/filedistribution/common/componentsdeleter.cpp1
-rw-r--r--juniper/src/vespa/juniper/querynode.cpp40
-rw-r--r--juniper/src/vespa/juniper/queryparser.cpp1
-rw-r--r--juniper/src/vespa/juniper/rpinterface.cpp9
-rw-r--r--logd/src/logd/forward.cpp2
-rw-r--r--logd/src/logd/service.h3
-rw-r--r--memfilepersistence/src/vespa/memfilepersistence/device/devicemapper.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp9
-rw-r--r--searchlib/src/vespa/searchlib/common/indexmetainfo.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/features/random_normal_feature.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_range_term_expander.h10
-rw-r--r--searchlib/src/vespa/searchlib/util/filesizecalculator.cpp9
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp6
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp8
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/urlresult.cpp5
-rw-r--r--staging_vespalib/src/tests/benchmark/testbase.cpp1
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h3
-rw-r--r--vespalib/src/vespa/vespalib/net/server_socket.cpp2
-rw-r--r--vespalog/src/logctl/logctl.cpp14
-rw-r--r--vespalog/src/vespa/log/bufferedlogger.cpp18
-rw-r--r--vespalog/src/vespa/log/bufferedlogger.h1
-rw-r--r--vespalog/src/vespa/log/log-target-file.cpp8
-rw-r--r--vespalog/src/vespa/log/log-target.cpp4
27 files changed, 65 insertions, 107 deletions
diff --git a/config/src/vespa/config/set/configsetsource.cpp b/config/src/vespa/config/set/configsetsource.cpp
index c62452a6415..75dcd3d3f65 100644
--- a/config/src/vespa/config/set/configsetsource.cpp
+++ b/config/src/vespa/config/set/configsetsource.cpp
@@ -2,9 +2,8 @@
#include "configsetsource.h"
#include <vespa/config/print/asciiconfigwriter.h>
-#include <vespa/config/common/misc.h>
#include <vespa/config/common/exceptions.h>
-#include <vespa/vespalib/stllike/asciistream.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".config.set.configsetsource");
@@ -48,7 +47,7 @@ ConfigSetSource::getConfig()
void
ConfigSetSource::reload(int64_t generation)
{
- LOG(debug, "Running update with generation(%" PRId64 ")", generation);
+ LOG(debug, "Running update with generation(%zd)", generation);
_generation = generation;
}
diff --git a/document/src/vespa/document/datatype/structdatatype.cpp b/document/src/vespa/document/datatype/structdatatype.cpp
index f6bd1fc5fa6..954bd9c742f 100644
--- a/document/src/vespa/document/datatype/structdatatype.cpp
+++ b/document/src/vespa/document/datatype/structdatatype.cpp
@@ -7,6 +7,7 @@
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/stllike/hash_map.hpp>
#include <iomanip>
+#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".document.datatype.struct");
diff --git a/filedistribution/src/vespa/filedistribution/common/componentsdeleter.cpp b/filedistribution/src/vespa/filedistribution/common/componentsdeleter.cpp
index 3cb5f4d008f..ddef7a2d175 100644
--- a/filedistribution/src/vespa/filedistribution/common/componentsdeleter.cpp
+++ b/filedistribution/src/vespa/filedistribution/common/componentsdeleter.cpp
@@ -1,5 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "componentsdeleter.h"
+#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".componentsdeleter");
diff --git a/juniper/src/vespa/juniper/querynode.cpp b/juniper/src/vespa/juniper/querynode.cpp
index 8718a76bf61..47bd5146432 100644
--- a/juniper/src/vespa/juniper/querynode.cpp
+++ b/juniper/src/vespa/juniper/querynode.cpp
@@ -4,6 +4,7 @@
#include "queryvisitor.h"
#include "juniperdebug.h"
#include <vespa/vespalib/util/stringfmt.h>
+#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".juniper.querynode");
@@ -145,12 +146,10 @@ void QueryNode::ComputeThreshold()
else if (!(_options & X_AND))
no_threshold = true;
- for (int i = 0; i < _nchild; i++)
- {
+ for (int i = 0; i < _nchild; i++) {
QueryExpr* qe = _children[i];
qe->ComputeThreshold();
- if (!no_threshold)
- {
+ if (!no_threshold) {
int w = qe->_weight;
if (_options | X_AND) th += w;
else
@@ -232,8 +231,7 @@ bool QueryTerm::Complex()
bool QueryNode::Complex()
{
- for (int i = 0; i < _nchild; i++)
- {
+ for (int i = 0; i < _nchild; i++) {
if (_children[i]->_arity > 1) return true;
}
return false;
@@ -243,8 +241,7 @@ bool QueryNode::Complex()
int QueryNode::MaxArity()
{
int max_arity = _arity;
- for (int i = 0; i < _nchild; i++)
- {
+ for (int i = 0; i < _nchild; i++) {
int ma = _children[i]->MaxArity();
if (ma > max_arity) max_arity = ma;
}
@@ -273,8 +270,7 @@ void SimplifyStack(QueryExpr*& orig_stack)
int compact = 0;
int i;
- if (!node->Complete())
- {
+ if (!node->Complete()) {
LOG(warning, "juniper: query stack incomplete, got arity %d, expected %d",
node->_nchild, node->_arity);
delete node;
@@ -282,10 +278,8 @@ void SimplifyStack(QueryExpr*& orig_stack)
return;
}
- for (i = 0; i < node->_arity; i++)
- {
- if (i > 0 && (node->_options & X_ONLY_1))
- {
+ for (i = 0; i < node->_arity; i++) {
+ if (i > 0 && (node->_options & X_ONLY_1)) {
// Get rid of children # >2 for RANK/ANDNOT
delete node->_children[i];
node->_children[i] = NULL;
@@ -296,15 +290,11 @@ void SimplifyStack(QueryExpr*& orig_stack)
if (node->_children[i] == NULL)
compact++;
}
- if (compact > 0)
- {
+ if (compact > 0) {
node->_nchild = 0;
- for (i = 0; i < node->_arity; i++)
- {
- if (node->_children[i])
- {
- if (i > node->_nchild)
- {
+ for (i = 0; i < node->_arity; i++) {
+ if (node->_children[i]) {
+ if (i > node->_nchild) {
// shift remaining nodes down - remember to update _childno for each node..
node->_children[node->_nchild] = node->_children[i];
node->_children[i]->_childno = node->_nchild;
@@ -316,11 +306,9 @@ void SimplifyStack(QueryExpr*& orig_stack)
node->_arity = node->_nchild;
}
- if (node->_arity <= 1)
- {
+ if (node->_arity <= 1) {
QueryExpr* ret = NULL;
- if (node->_arity == 1)
- {
+ if (node->_arity == 1) {
ret = node->_children[0];
node->_children[0] = NULL;
ret->_parent = node->_parent;
diff --git a/juniper/src/vespa/juniper/queryparser.cpp b/juniper/src/vespa/juniper/queryparser.cpp
index 2355e41d005..4acc70dc8ab 100644
--- a/juniper/src/vespa/juniper/queryparser.cpp
+++ b/juniper/src/vespa/juniper/queryparser.cpp
@@ -5,6 +5,7 @@
#include "queryparser.h"
#include "juniperdebug.h"
#include <vector>
+#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".juniper.queryparser");
diff --git a/juniper/src/vespa/juniper/rpinterface.cpp b/juniper/src/vespa/juniper/rpinterface.cpp
index 9f10972a448..890481b4b94 100644
--- a/juniper/src/vespa/juniper/rpinterface.cpp
+++ b/juniper/src/vespa/juniper/rpinterface.cpp
@@ -1,20 +1,15 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "rpinterface.h"
-#include <string>
-#include <vector>
#include "juniperparams.h"
#include "foreach_utils.h"
-#include "juniperdebug.h"
-#include "SummaryConfig.h"
#include "queryvisitor.h"
-#include "querynode.h"
#include "queryhandle.h"
#include "propreader.h"
#include "result.h"
#include "config.h"
-#include "querymodifier.h"
-#include <vespa/fastlib/text/normwordfolder.h>
+#include <vector>
+#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".juniper.rpinterface");
diff --git a/logd/src/logd/forward.cpp b/logd/src/logd/forward.cpp
index 6e980034c9b..560ccaf1063 100644
--- a/logd/src/logd/forward.cpp
+++ b/logd/src/logd/forward.cpp
@@ -3,10 +3,10 @@
#include "forward.h"
#include "errhandle.h"
#include <vespa/vespalib/component/vtag.h>
+#include <unistd.h>
#include <vespa/log/log.h>
LOG_SETUP("");
-LOG_RCSID("$Id$");
namespace logdemon {
diff --git a/logd/src/logd/service.h b/logd/src/logd/service.h
index 700ab85fe27..3ff2e7fab92 100644
--- a/logd/src/logd/service.h
+++ b/logd/src/logd/service.h
@@ -1,9 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <assert.h>
+
#include <logd/config-logd.h>
#include <vespa/vespalib/util/hashmap.h>
#include <vespa/log/log.h>
+#include <cassert>
namespace logdemon {
diff --git a/memfilepersistence/src/vespa/memfilepersistence/device/devicemapper.cpp b/memfilepersistence/src/vespa/memfilepersistence/device/devicemapper.cpp
index 8ddf215d616..fdecb38ccf0 100644
--- a/memfilepersistence/src/vespa/memfilepersistence/device/devicemapper.cpp
+++ b/memfilepersistence/src/vespa/memfilepersistence/device/devicemapper.cpp
@@ -5,13 +5,12 @@
#include <vespa/vespalib/util/exceptions.h>
#include <fstream>
#include <sstream>
+#include <sys/stat.h>
#include <vespa/log/log.h>
LOG_SETUP(".persistence.devicemapper");
-namespace storage {
-
-namespace memfile {
+namespace storage::memfile {
namespace {
uint64_t getDevice(const std::string& path) {
@@ -95,5 +94,3 @@ AdvancedDeviceMapper::getPartitionId(const std::string& fileOnFS) const
}
}
-
-} // storage
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
index eb462ebebe2..9b2fc71702b 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
@@ -5,6 +5,7 @@
#include <vespa/searchlib/util/filekit.h>
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/vespalib/stllike/asciistream.h>
+#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".proton.attribute.attribute_directory");
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp
index aa56daddeb2..1a18fee265f 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp
@@ -2,6 +2,7 @@
#include "pruneremoveddocumentsoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
+#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".proton.feedoperation.pruneremoveddocumentsoperation");
diff --git a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp
index bb45103a13f..3d655f3decf 100644
--- a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp
@@ -1,13 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "lid_space_compaction_job.h"
-#include "ifrozenbuckethandler.h"
#include "imaintenancejobrunner.h"
#include "i_disk_mem_usage_notifier.h"
#include <vespa/searchcore/proton/common/eventlogger.h>
-
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.server.lid_space_compaction_job");
+#include <cassert>
using search::DocumentMetaData;
using search::LidUsageStats;
@@ -76,9 +73,7 @@ LidSpaceCompactionJob::compactLidSpace(const LidUsageStats &stats)
CompactLidSpaceOperation op(_handler.getSubDbId(), wantedLidLimit);
_opStorer.storeOperation(op);
_handler.handleCompactLidSpace(op);
- if (LOG_WOULD_LOG(event)) {
- EventLogger::lidSpaceCompactionComplete(_handler.getName(), wantedLidLimit);
- }
+ EventLogger::lidSpaceCompactionComplete(_handler.getName(), wantedLidLimit);
_shouldCompactLidSpace = false;
}
diff --git a/searchlib/src/vespa/searchlib/common/indexmetainfo.cpp b/searchlib/src/vespa/searchlib/common/indexmetainfo.cpp
index 4344895ad63..f92087f7352 100644
--- a/searchlib/src/vespa/searchlib/common/indexmetainfo.cpp
+++ b/searchlib/src/vespa/searchlib/common/indexmetainfo.cpp
@@ -3,6 +3,7 @@
#include "indexmetainfo.h"
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/util/guard.h>
+#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".indexmetainfo");
diff --git a/searchlib/src/vespa/searchlib/features/random_normal_feature.cpp b/searchlib/src/vespa/searchlib/features/random_normal_feature.cpp
index 127dd0feecf..44bbe0db6e3 100644
--- a/searchlib/src/vespa/searchlib/features/random_normal_feature.cpp
+++ b/searchlib/src/vespa/searchlib/features/random_normal_feature.cpp
@@ -21,7 +21,7 @@ RandomNormalExecutor::RandomNormalExecutor(uint64_t seed, double mean, double st
_spare(0.0)
{
- LOG(debug, "RandomNormalExecutor: seed=%" PRIu64 ", mean=%f, stddev=%f", seed, mean, stddev);
+ LOG(debug, "RandomNormalExecutor: seed=%zu, mean=%f, stddev=%f", seed, mean, stddev);
_rnd.srand48(seed);
}
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_range_term_expander.h b/searchlib/src/vespa/searchlib/predicate/predicate_range_term_expander.h
index c6f7928f4d0..9b9c8eaaa3e 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_range_term_expander.h
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_range_term_expander.h
@@ -3,10 +3,9 @@
#pragma once
#include <vespa/vespalib/stllike/string.h>
-#include <vespa/vespalib/util/exceptions.h>
+#include <climits>
-namespace search {
-namespace predicate {
+namespace search::predicate {
/**
* Helper class for expanding a point in a predicate range query to
@@ -92,7 +91,4 @@ void PredicateRangeTermExpander::expand(const vespalib::string &key, int64_t sig
}
}
-
-} // namespace search::predicate
-} // namespace search
-
+}
diff --git a/searchlib/src/vespa/searchlib/util/filesizecalculator.cpp b/searchlib/src/vespa/searchlib/util/filesizecalculator.cpp
index 342ccb0104e..4be1eb668c9 100644
--- a/searchlib/src/vespa/searchlib/util/filesizecalculator.cpp
+++ b/searchlib/src/vespa/searchlib/util/filesizecalculator.cpp
@@ -31,22 +31,19 @@ FileSizeCalculator::extractFileSize(const vespalib::GenericHeader &header,
uint64_t fileByteSize = fileBitSize / 8;
if (!byteAligned(fileBitSize)) {
LOG(error,
- "Bad header file size tag for %s, fileBitSize=%" PRIu64
- " which is not a multiple of 8",
+ "Bad header file size tag for %s, fileBitSize=%zu which is not a multiple of 8",
fileName.c_str(), fileBitSize);
return false;
}
if (fileByteSize < headerLen) {
LOG(error,
- "Bad header file size tag for %s, fileBitSize=%" PRIu64
- " but header is %" PRIu64 "bits",
+ "Bad header file size tag for %s, fileBitSize=%zu but header is %zu bits",
fileName.c_str(), fileBitSize, headerLen * 8);
return false;
}
if (fileByteSize > fileSize) {
LOG(error,
- "Bad header file size tag for %s, fileBitSize=%" PRIu64
- " but whole file size is %" PRIu64 "bits",
+ "Bad header file size tag for %s, fileBitSize=%zu but whole file size is %zu bits",
fileName.c_str(), fileBitSize, fileSize * 8);
return false;
}
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp
index e2dda337e73..697e2ed6722 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp
@@ -6,12 +6,12 @@
#include <vespa/vespalib/util/jsonwriter.h>
#include <vespa/vespalib/data/slime/cursor.h>
#include <vespa/vespalib/stllike/asciistream.h>
+#include <climits>
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.docsummary.geoposdfw");
-namespace search {
-namespace docsummary {
+namespace search::docsummary {
using attribute::IAttributeVector;
using attribute::IAttributeContext;
@@ -110,5 +110,3 @@ GeoPositionDFW::create(const char *attribute_name,
}
-}
-
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp
index 841840d8349..be9517eba03 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp
@@ -2,16 +2,15 @@
#include "positionsdfw.h"
#include "docsumstate.h"
-#include "idocsumenvironment.h"
#include <vespa/searchlib/common/location.h>
#include <vespa/vespalib/stllike/asciistream.h>
#include <cmath>
+#include <climits>
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.docsummary.positionsdfw");
-namespace search {
-namespace docsummary {
+namespace search::docsummary {
using search::attribute::IAttributeContext;
using search::attribute::IAttributeVector;
@@ -223,5 +222,4 @@ AbsDistanceDFW::UP createAbsDistanceDFW(const char *attribute_name,
return ret;
}
-} // namespace docsummary
-} // namespace search
+}
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/urlresult.cpp b/searchsummary/src/vespa/searchsummary/docsummary/urlresult.cpp
index 0d3a212fc1f..d0beb2bd315 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/urlresult.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/urlresult.cpp
@@ -3,12 +3,12 @@
#include "urlresult.h"
#include "resultconfig.h"
#include <zlib.h>
+#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.docsummary.urlresult");
-namespace search {
-namespace docsummary {
+namespace search::docsummary {
urlresult::urlresult(uint32_t partition, uint32_t docid, HitRank metric)
: _partition(partition),
@@ -811,4 +811,3 @@ GeneralResult::_inplace_unpack(const char *buf, const size_t buflen)
}
}
-}
diff --git a/staging_vespalib/src/tests/benchmark/testbase.cpp b/staging_vespalib/src/tests/benchmark/testbase.cpp
index 93f5c9b975a..6de6f66f76b 100644
--- a/staging_vespalib/src/tests/benchmark/testbase.cpp
+++ b/staging_vespalib/src/tests/benchmark/testbase.cpp
@@ -1,6 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "testbase.h"
#include <vespa/fastos/timestamp.h>
+#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".testbase");
diff --git a/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h b/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h
index 51bdb94188e..9938d6522e7 100644
--- a/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h
+++ b/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h
@@ -51,8 +51,7 @@ private:
}
bool requestModifiedBucketsFromProvider();
void nextRecheckChunk(std::vector<RecheckBucketInfoCommand::SP>&);
- void dispatchAllToPersistenceQueues(
- const std::vector<RecheckBucketInfoCommand::SP>&);
+ void dispatchAllToPersistenceQueues(const std::vector<RecheckBucketInfoCommand::SP>&);
spi::PersistenceProvider& _provider;
ServiceLayerComponent::UP _component;
diff --git a/vespalib/src/vespa/vespalib/net/server_socket.cpp b/vespalib/src/vespa/vespalib/net/server_socket.cpp
index 9359f5824c0..0a5310bbeb3 100644
--- a/vespalib/src/vespa/vespalib/net/server_socket.cpp
+++ b/vespalib/src/vespa/vespalib/net/server_socket.cpp
@@ -2,6 +2,8 @@
#include "server_socket.h"
#include "socket_spec.h"
+#include <sys/stat.h>
+#include <dirent.h>
#include <vespa/log/log.h>
LOG_SETUP(".vespalib.net.server_socket");
diff --git a/vespalog/src/logctl/logctl.cpp b/vespalog/src/logctl/logctl.cpp
index 8457fb944ce..72891769eee 100644
--- a/vespalog/src/logctl/logctl.cpp
+++ b/vespalog/src/logctl/logctl.cpp
@@ -1,19 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <sys/types.h>
-#include <cstdio>
-#include <cstdlib>
-#include <unistd.h>
-#include <cstring>
-#include <limits.h>
-
-#include <memory>
-#include <vector>
-#include <string>
#include <vespa/defaults.h>
#include <vespa/log/control-file.h>
#include <vespa/log/internal.h>
#include <vespa/log/component.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <sys/stat.h>
+
LOG_SETUP("logctl", "$Id$");
using namespace ns_log;
diff --git a/vespalog/src/vespa/log/bufferedlogger.cpp b/vespalog/src/vespa/log/bufferedlogger.cpp
index 30f3dcb648d..db2021324c3 100644
--- a/vespalog/src/vespa/log/bufferedlogger.cpp
+++ b/vespalog/src/vespa/log/bufferedlogger.cpp
@@ -1,14 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/bufferedlogger.h>
-
-#include <iomanip>
-#include <iostream>
-#include <sstream>
-#include <vector>
-#include <stdarg.h>
-#include <sys/time.h>
-
+#include "bufferedlogger.h"
+#include <vespa/fastos/mutex.h>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/identity.hpp>
#include <boost/multi_index/member.hpp>
@@ -16,6 +9,13 @@
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/sequenced_index.hpp>
+#include <iomanip>
+#include <iostream>
+#include <sstream>
+#include <vector>
+#include <cstdarg>
+#include <ctime>
+
namespace ns_log {
// implementation details for BufferedLogger
diff --git a/vespalog/src/vespa/log/bufferedlogger.h b/vespalog/src/vespa/log/bufferedlogger.h
index 4f20f46af4c..7ca8d799840 100644
--- a/vespalog/src/vespa/log/bufferedlogger.h
+++ b/vespalog/src/vespa/log/bufferedlogger.h
@@ -82,7 +82,6 @@
#define VESPA_LOG_LOGENTRYMAXAGE 300 // Max seconds an entry can be cached
#define VESPA_LOG_COUNTAGEFACTOR 5 // How many seconds each count counts for
-#include <vespa/fastos/mutex.h>
#include <vespa/log/log.h>
#include <sstream>
#include <string>
diff --git a/vespalog/src/vespa/log/log-target-file.cpp b/vespalog/src/vespa/log/log-target-file.cpp
index 07b638d7f84..e88f1018675 100644
--- a/vespalog/src/vespa/log/log-target-file.cpp
+++ b/vespalog/src/vespa/log/log-target-file.cpp
@@ -1,16 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <sys/types.h>
#include <unistd.h>
#include <cstring>
-#include <sys/stat.h>
#include <fcntl.h>
-#include <cstdlib>
-#include <errno.h>
-#include <cstdio>
+#include <cerrno>
+#include <cassert>
#include "log.h"
LOG_SETUP(".log");
-LOG_RCSID("$Id$");
#include "log-target-file.h"
#include "internal.h"
diff --git a/vespalog/src/vespa/log/log-target.cpp b/vespalog/src/vespa/log/log-target.cpp
index d34e0067b04..b6692caa308 100644
--- a/vespalog/src/vespa/log/log-target.cpp
+++ b/vespalog/src/vespa/log/log-target.cpp
@@ -1,11 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <sys/types.h>
#include <cstring>
-#include <cstdlib>
+#include <cassert>
#include "log.h"
LOG_SETUP(".log");
-LOG_RCSID("$Id$");
#include "log-target-fd.h"
#include "log-target-file.h"