aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2018-06-20 10:38:06 +0200
committerArne Juul <arnej@yahoo-inc.com>2018-06-20 10:38:06 +0200
commitd161b6bcb87566a31cb5e0700b84f968539f502f (patch)
treecfbc4612f439510afffd8fc190bf7eeec2a52ae7
parent2915ddaa1c176a47d6c62d3b25bad9bb369c1448 (diff)
move LOG_SETUP after other includes
-rw-r--r--searchcore/src/tests/applyattrupdates/applyattrupdates.cpp6
-rw-r--r--searchcore/src/tests/grouping/grouping.cpp6
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_aspect_delayer/attribute_aspect_delayer_test.cpp6
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp6
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_test.cpp6
-rw-r--r--searchcore/src/tests/proton/common/cachedselect_test.cpp6
-rw-r--r--searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp6
-rw-r--r--searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp6
-rw-r--r--searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp6
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp6
-rw-r--r--searchcore/src/tests/proton/matching/matching_test.cpp6
-rw-r--r--searchcore/src/tests/proton/matching/querynodes_test.cpp3
-rw-r--r--searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp6
-rw-r--r--searchcore/src/tests/proton/server/documentretriever_test.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp1
-rw-r--r--searchlib/src/apps/tests/btreestress_test.cpp6
-rw-r--r--searchlib/src/tests/aggregator/attr_test.cpp6
-rw-r--r--searchlib/src/tests/aggregator/perdocexpr.cpp6
-rw-r--r--searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp6
-rw-r--r--searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp6
-rw-r--r--searchlib/src/tests/attribute/postinglist/postinglist.cpp6
-rw-r--r--searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp6
-rw-r--r--searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp6
-rw-r--r--searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp7
-rw-r--r--searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp6
-rw-r--r--searchlib/src/tests/btree/frozenbtree_test.cpp6
-rw-r--r--searchlib/src/tests/btree/iteratespeed.cpp6
-rw-r--r--searchlib/src/tests/diskindex/fusion/fusion_test.cpp6
-rw-r--r--searchlib/src/tests/grouping/grouping_test.cpp6
-rw-r--r--searchlib/src/tests/groupingengine/groupingengine_benchmark.cpp6
-rw-r--r--searchlib/src/tests/groupingengine/groupingengine_test.cpp6
-rw-r--r--searchlib/src/tests/memoryindex/dictionary/dictionary_test.cpp6
-rw-r--r--searchlib/src/tests/predicate/simple_index_test.cpp6
-rw-r--r--searchlib/src/tests/queryeval/queryeval.cpp7
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attributeiterators.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attributevector.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attrvector.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createarraystd.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createsetstd.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp7
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumattribute.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumcomparator.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstore.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstorebase.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/extendableattributes.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/fixedsourceselector.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/flagattribute.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericattribute.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringpostattribute.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingstore.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singleenumattribute.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlenumericattribute.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlestringattribute.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/btree/btreeinserter.cpp7
-rw-r--r--searchlib/src/vespa/searchlib/btree/btreeiterator.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/btree/btreeroot.cpp7
-rw-r--r--searchlib/src/vespa/searchlib/btree/btreestore.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/dictionary.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/memoryfieldindex.cpp8
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/ordereddocumentinserter.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/postingiterator.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/predicate/document_features_store.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_index.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_tree_annotator.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_zero_constraint_posting_list.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/predicate/simple_index.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/test/fakedata/fakeegcompr64filterocc.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.cpp5
-rw-r--r--storage/src/tests/bucketdb/judymultimaptest.cpp5
-rw-r--r--storage/src/tests/bucketdb/lockablemaptest.cpp5
-rw-r--r--storage/src/vespa/storage/bucketdb/storbucketdb.cpp3
-rw-r--r--storage/src/vespa/storage/bucketmover/bucketmover.cpp5
-rw-r--r--storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp6
-rw-r--r--streamingvisitors/src/tests/searchvisitor/searchvisitor.cpp6
-rw-r--r--streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp6
-rw-r--r--vespalib/src/vespa/vespalib/stllike/asciistream.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/testkit/test_master.cpp1
94 files changed, 253 insertions, 228 deletions
diff --git a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
index da1a7cdaa01..48c02215732 100644
--- a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
+++ b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("applyattrupdates_test");
-
#include <vespa/document/base/testdocrepo.h>
#include <vespa/document/fieldvalue/arrayfieldvalue.h>
#include <vespa/document/fieldvalue/bytefieldvalue.h>
@@ -24,6 +21,9 @@ LOG_SETUP("applyattrupdates_test");
#include <vespa/searchlib/attribute/reference_attribute.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("applyattrupdates_test");
+
using namespace document;
using search::attribute::BasicType;
using search::attribute::Config;
diff --git a/searchcore/src/tests/grouping/grouping.cpp b/searchcore/src/tests/grouping/grouping.cpp
index 7c396d6d281..7e21fffe9fd 100644
--- a/searchcore/src/tests/grouping/grouping.cpp
+++ b/searchcore/src/tests/grouping/grouping.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("grouping_test");
-
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/searchlib/aggregation/grouping.h>
#include <vespa/searchlib/aggregation/sumaggregationresult.h>
@@ -15,6 +12,9 @@ LOG_SETUP("grouping_test");
#include <vespa/searchcore/proton/matching/sessionmanager.h>
#include <iostream>
+#include <vespa/log/log.h>
+LOG_SETUP("grouping_test");
+
using namespace search::attribute;
using namespace search::aggregation;
using namespace search::expression;
diff --git a/searchcore/src/tests/proton/attribute/attribute_aspect_delayer/attribute_aspect_delayer_test.cpp b/searchcore/src/tests/proton/attribute/attribute_aspect_delayer/attribute_aspect_delayer_test.cpp
index 716db497424..24c38ad118b 100644
--- a/searchcore/src/tests/proton/attribute/attribute_aspect_delayer/attribute_aspect_delayer_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_aspect_delayer/attribute_aspect_delayer_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("attibute_aspect_delayer_test");
-
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/searchcore/proton/test/attribute_utils.h>
@@ -14,6 +11,9 @@ LOG_SETUP("attibute_aspect_delayer_test");
#include <vespa/config-attributes.h>
#include <vespa/config-summarymap.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attibute_aspect_delayer_test");
+
using vespa::config::search::AttributesConfig;
using vespa::config::search::AttributesConfigBuilder;
using vespa::config::search::IndexschemaConfig;
diff --git a/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp b/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
index e95543dab69..4957d3aead2 100644
--- a/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("attribute_initializer_test");
-
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchcore/proton/attribute/attribute_directory.h>
#include <vespa/searchcore/proton/attribute/attribute_factory.h>
@@ -13,6 +10,9 @@ LOG_SETUP("attribute_initializer_test");
#include <vespa/searchlib/test/directory_handler.h>
#include <vespa/vespalib/stllike/string.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attribute_initializer_test");
+
using search::attribute::Config;
using search::attribute::BasicType;
using search::attribute::CollectionType;
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp
index 346f94180b5..0e6bd2c74fe 100644
--- a/searchcore/src/tests/proton/attribute/attribute_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("attribute_test");
-
#include <vespa/config-attributes.h>
#include <vespa/document/fieldvalue/document.h>
#include <vespa/document/predicate/predicate_slime_builder.h>
@@ -47,6 +44,9 @@ LOG_SETUP("attribute_test");
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchcommon/attribute/iattributevector.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attribute_test");
+
namespace vespa { namespace config { namespace search {}}}
using namespace config;
diff --git a/searchcore/src/tests/proton/common/cachedselect_test.cpp b/searchcore/src/tests/proton/common/cachedselect_test.cpp
index 5de2728fa59..dcba8fda1c6 100644
--- a/searchcore/src/tests/proton/common/cachedselect_test.cpp
+++ b/searchcore/src/tests/proton/common/cachedselect_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("cachedselect_test");
-
#include <vespa/document/base/documentid.h>
#include <vespa/document/datatype/documenttype.h>
#include <vespa/document/fieldvalue/document.h>
@@ -26,6 +23,9 @@ LOG_SETUP("cachedselect_test");
#include <vespa/searchlib/test/mock_attribute_manager.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("cachedselect_test");
+
using document::DataType;
using document::Document;
using document::DocumentId;
diff --git a/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp b/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
index 4e66b9a8589..3add3b727b9 100644
--- a/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
+++ b/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("document_iterator_test");
-
#include <vespa/document/fieldset/fieldsets.h>
#include <vespa/document/fieldvalue/fieldvalues.h>
#include <vespa/document/datatype/documenttype.h>
@@ -20,6 +17,9 @@ LOG_SETUP("document_iterator_test");
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/testkit/test_kit.h>
+#include <vespa/log/log.h>
+LOG_SETUP("document_iterator_test");
+
using document::BucketId;
using document::DataType;
using document::Document;
diff --git a/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp b/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
index 0af15f0bd05..dc4e88ae005 100644
--- a/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
@@ -1,7 +1,4 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("cluster_state_handler_test");
-
#include <vespa/searchcore/proton/server/clusterstatehandler.h>
#include <vespa/searchcore/proton/server/iclusterstatechangedhandler.h>
#include <vespa/searchcore/proton/test/test.h>
@@ -9,6 +6,9 @@ LOG_SETUP("cluster_state_handler_test");
#include <vespa/vdslib/distribution/distribution.h>
#include <vespa/vdslib/state/clusterstate.h>
+#include <vespa/log/log.h>
+LOG_SETUP("cluster_state_handler_test");
+
using namespace proton;
using document::BucketId;
using storage::lib::Distribution;
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
index 7daab40c40f..af6a9d38385 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("document_bucket_mover_test");
-
#include <vespa/searchcore/proton/bucketdb/bucketdbhandler.h>
#include <vespa/searchcore/proton/bucketdb/bucket_create_notifier.h>
#include <vespa/searchcore/proton/test/bucketfactory.h>
@@ -21,6 +18,9 @@ LOG_SETUP("document_bucket_mover_test");
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("document_bucket_mover_test");
+
using namespace proton;
using document::BucketId;
using document::Document;
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index 3ddcebbc428..4a3ced6891c 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("maintenancecontroller_test");
-
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/searchcore/proton/attribute/attribute_usage_filter.h>
@@ -41,6 +38,9 @@ LOG_SETUP("maintenancecontroller_test");
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <unistd.h>
+#include <vespa/log/log.h>
+LOG_SETUP("maintenancecontroller_test");
+
using namespace proton;
using namespace vespalib::slime;
using document::BucketId;
diff --git a/searchcore/src/tests/proton/matching/matching_test.cpp b/searchcore/src/tests/proton/matching/matching_test.cpp
index 0280f377549..0d474fc57cf 100644
--- a/searchcore/src/tests/proton/matching/matching_test.cpp
+++ b/searchcore/src/tests/proton/matching/matching_test.cpp
@@ -1,9 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/log/log.h>
-LOG_SETUP("matching_test");
-
#include <vespa/document/base/globalid.h>
#include <initializer_list>
#include <vespa/searchcommon/attribute/iattributecontext.h>
@@ -36,6 +33,9 @@ LOG_SETUP("matching_test");
#include <vespa/searchcore/proton/matching/match_tools.h>
#include <vespa/searchcore/proton/matching/match_context.h>
+#include <vespa/log/log.h>
+LOG_SETUP("matching_test");
+
using namespace proton::matching;
using namespace proton;
using namespace search::aggregation;
diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp
index 3b8b85924c2..297f75054b2 100644
--- a/searchcore/src/tests/proton/matching/querynodes_test.cpp
+++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp
@@ -30,12 +30,11 @@
#include <vespa/searchlib/queryeval/fake_search.h>
#include <vespa/searchlib/queryeval/fake_requestcontext.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/searchlib/attribute/singlenumericattribute.hpp>
#include <vespa/log/log.h>
LOG_SETUP("querynodes_test");
-#include <vespa/searchlib/attribute/singlenumericattribute.hpp>
-
using search::fef::FieldInfo;
using search::fef::FieldType;
using search::fef::MatchData;
diff --git a/searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp b/searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp
index 18ee8667ecc..9b268350b0d 100644
--- a/searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp
+++ b/searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp
@@ -1,14 +1,14 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/log/log.h>
-LOG_SETUP("document_db_reference_test");
-
#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
#include <vespa/searchcore/proton/reference/document_db_reference.h>
#include <vespa/searchcore/proton/test/mock_attribute_manager.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
+#include <vespa/log/log.h>
+LOG_SETUP("document_db_reference_test");
+
using namespace proton;
using search::AttributeFactory;
diff --git a/searchcore/src/tests/proton/server/documentretriever_test.cpp b/searchcore/src/tests/proton/server/documentretriever_test.cpp
index 6f74596b538..f8ec0d20d33 100644
--- a/searchcore/src/tests/proton/server/documentretriever_test.cpp
+++ b/searchcore/src/tests/proton/server/documentretriever_test.cpp
@@ -1,9 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Unit tests for documentretriever.
-#include <vespa/log/log.h>
-LOG_SETUP("document_retriever_test");
-
#include <vespa/document/base/documentid.h>
#include <vespa/document/bucket/bucketid.h>
#include <vespa/document/datatype/datatype.h>
@@ -36,6 +33,9 @@ LOG_SETUP("document_retriever_test");
#include <vespa/searchlib/attribute/stringbase.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("document_retriever_test");
+
using document::ArrayFieldValue;
using document::FieldValue;
using document::BucketId;
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
index 506f4b5164c..eb6020b8d5f 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.attribute.attribute_writer");
-
#include "attribute_writer.h"
#include "ifieldupdatecallback.h"
#include "attributemanager.h"
@@ -18,6 +15,9 @@ LOG_SETUP(".proton.attribute.attribute_writer");
#include <vespa/document/fieldvalue/document.h>
#include <vespa/vespalib/stllike/hash_map.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.attribute.attribute_writer");
+
using namespace document;
using namespace search;
using search::attribute::ImportedAttributeVector;
diff --git a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
index 8faa6e03401..b76451b377d 100644
--- a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
@@ -4,10 +4,10 @@
#include "selectcontext.h"
#include <vespa/searchcommon/attribute/attributecontent.h>
#include <vespa/searchlib/attribute/attributevector.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".proton.common.attribute_field_value_node");
-
namespace proton {
using document::select::Context;
diff --git a/searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp b/searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp
index f3ef4856631..dac0fbc2cc7 100644
--- a/searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp
@@ -1,7 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.common.attrupdate");
#include "attrupdate.h"
#include <vespa/document/fieldvalue/arrayfieldvalue.h>
#include <vespa/document/fieldvalue/predicatefieldvalue.h>
@@ -19,11 +17,13 @@ LOG_SETUP(".proton.common.attrupdate");
#include <vespa/searchlib/common/base.h>
#include <vespa/searchlib/tensor/tensor_attribute.h>
#include <vespa/searchlib/attribute/reference_attribute.h>
-
#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/changevector.hpp>
#include <sstream>
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.common.attrupdate");
+
using namespace document;
using vespalib::make_string;
using search::tensor::TensorAttribute;
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
index b81cfae0ee7..838efdfe5a4 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.documentmetastore");
-
#include "documentmetastore.h"
#include "search_context.h"
#include "documentmetastoresaver.h"
@@ -24,6 +21,8 @@ LOG_SETUP(".proton.documentmetastore");
#include <vespa/fastos/file.h>
#include "document_meta_store_versions.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.documentmetastore");
using document::BucketId;
using document::GlobalId;
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
index fa43ce370ae..d52d0fcd841 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
@@ -3,7 +3,6 @@
#include "match_tools.h"
#include "querynodes.h"
#include <vespa/searchlib/parsequery/stackdumpiterator.h>
-
#include <vespa/log/log.h>
LOG_SETUP(".proton.matching.match_tools");
#include <vespa/searchlib/query/tree/querytreecreator.h>
diff --git a/searchlib/src/apps/tests/btreestress_test.cpp b/searchlib/src/apps/tests/btreestress_test.cpp
index e0bdd5b406e..ca92ad4865b 100644
--- a/searchlib/src/apps/tests/btreestress_test.cpp
+++ b/searchlib/src/apps/tests/btreestress_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("btreestress_test");
-
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/searchlib/btree/btreeroot.h>
#include <vespa/searchlib/btree/btreebuilder.h>
@@ -24,6 +21,9 @@ LOG_SETUP("btreestress_test");
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <vespa/vespalib/util/lambdatask.h>
+#include <vespa/log/log.h>
+LOG_SETUP("btreestress_test");
+
using MyTree = search::btree::BTree<uint32_t, uint32_t>;
using MyTreeIterator = typename MyTree::Iterator;
using MyTreeConstIterator = typename MyTree::ConstIterator;
diff --git a/searchlib/src/tests/aggregator/attr_test.cpp b/searchlib/src/tests/aggregator/attr_test.cpp
index c57f335aceb..21fc41e3b9d 100644
--- a/searchlib/src/tests/aggregator/attr_test.cpp
+++ b/searchlib/src/tests/aggregator/attr_test.cpp
@@ -1,9 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
-#include <vespa/log/log.h>
-LOG_SETUP("attr_test");
-
#include <vespa/searchlib/aggregation/perdocexpression.h>
#include <vespa/searchlib/aggregation/aggregation.h>
#include <vespa/searchlib/attribute/extendableattributes.h>
@@ -11,6 +8,9 @@ LOG_SETUP("attr_test");
#include <vespa/searchlib/expression/arrayatlookupfunctionnode.h>
#include <vespa/searchlib/expression/interpolatedlookupfunctionnode.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attr_test");
+
using namespace search;
using namespace search::expression;
using namespace vespalib;
diff --git a/searchlib/src/tests/aggregator/perdocexpr.cpp b/searchlib/src/tests/aggregator/perdocexpr.cpp
index 9837deb0186..25bbd16de07 100644
--- a/searchlib/src/tests/aggregator/perdocexpr.cpp
+++ b/searchlib/src/tests/aggregator/perdocexpr.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("per_doc_expr_test");
-
#include <vespa/searchlib/aggregation/aggregation.h>
#include <vespa/searchlib/aggregation/expressioncountaggregationresult.h>
#include <vespa/searchlib/aggregation/perdocexpression.h>
@@ -17,6 +14,9 @@ LOG_SETUP("per_doc_expr_test");
#include <iostream>
#include <list>
+#include <vespa/log/log.h>
+LOG_SETUP("per_doc_expr_test");
+
#define MU std::make_unique
using namespace search;
diff --git a/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp b/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp
index 0eb2dd2cbc4..5f10f5ad631 100644
--- a/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp
+++ b/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("attributebenchmark");
-
#include <vespa/searchlib/util/randomgenerator.h>
#include <vespa/searchlib/attribute/attribute.h>
#include <vespa/searchlib/attribute/attributeguard.h>
@@ -21,6 +18,9 @@ LOG_SETUP("attributebenchmark");
#include "attributeupdater.h"
#include <sys/resource.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attributebenchmark");
+
using std::shared_ptr;
typedef std::vector<uint32_t> NumVector;
diff --git a/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp b/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
index 9df37e36b49..9a7552ce681 100644
--- a/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
+++ b/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
@@ -1,9 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
-#include <vespa/log/log.h>
-LOG_SETUP("document_weight_iterator_test");
-
#include <vespa/searchlib/attribute/i_document_weight_attribute.h>
#include <vespa/searchlib/attribute/attributevector.h>
#include <vespa/searchlib/attribute/attribute.h>
@@ -28,6 +25,9 @@ LOG_SETUP("document_weight_iterator_test");
#include <vespa/searchlib/test/searchiteratorverifier.h>
#include <vespa/searchlib/queryeval/document_weight_search_iterator.h>
+#include <vespa/log/log.h>
+LOG_SETUP("document_weight_iterator_test");
+
using namespace search;
using namespace search::attribute;
diff --git a/searchlib/src/tests/attribute/postinglist/postinglist.cpp b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
index eb8712b774c..fe79db163f8 100644
--- a/searchlib/src/tests/attribute/postinglist/postinglist.cpp
+++ b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("postinglist_test");
-
#include <vespa/searchlib/datastore/datastore.h>
#include <vespa/searchlib/btree/btreenodeallocator.hpp>
#include <vespa/searchlib/btree/btreenode.hpp>
@@ -14,6 +11,9 @@ LOG_SETUP("postinglist_test");
#include <vespa/vespalib/testkit/testapp.h>
#include <set>
+#include <vespa/log/log.h>
+LOG_SETUP("postinglist_test");
+
namespace search {
using vespalib::GenerationHandler;
diff --git a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
index ffdf01ce494..f0496049f0e 100644
--- a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
+++ b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("postinglistattribute_test");
-
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/stllike/asciistream.h>
@@ -21,6 +18,9 @@ LOG_SETUP("postinglistattribute_test");
#include <vespa/fastos/file.h>
#include <iostream>
+#include <vespa/log/log.h>
+LOG_SETUP("postinglistattribute_test");
+
using std::shared_ptr;
bool
diff --git a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp
index cbb8f18f9f8..9ed08643def 100644
--- a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp
+++ b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("attribute_searchable_adapter_test");
-
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/searchcommon/attribute/iattributecontext.h>
#include <vespa/searchlib/attribute/attribute_blueprint_factory.h>
@@ -31,6 +28,9 @@ LOG_SETUP("attribute_searchable_adapter_test");
#include <vespa/searchlib/queryeval/wand/parallel_weak_and_search.h>
#include <memory>
+#include <vespa/log/log.h>
+LOG_SETUP("attribute_searchable_adapter_test");
+
using search::AttributeFactory;
using search::AttributeGuard;
using search::AttributeVector;
diff --git a/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp b/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp
index c5805447d7f..be64edf89f2 100644
--- a/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp
+++ b/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/log/log.h>
-LOG_SETUP("attribute_weighted_set_blueprint_test");
-
#include <vespa/searchlib/attribute/attribute_blueprint_factory.h>
#include <vespa/searchlib/attribute/attribute_weighted_set_blueprint.h>
#include <vespa/searchlib/attribute/attributecontext.h>
@@ -16,9 +13,11 @@ LOG_SETUP("attribute_weighted_set_blueprint_test");
#include <vespa/searchlib/queryeval/fake_result.h>
#include <vespa/searchlib/queryeval/weighted_set_term_search.h>
#include <vespa/searchlib/queryeval/fake_requestcontext.h>
-
#include <vespa/searchlib/attribute/enumstore.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP("attribute_weighted_set_blueprint_test");
+
using namespace search;
using namespace search::query;
using namespace search::fef;
diff --git a/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp b/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp
index 2b8279c6822..dc7cf53d188 100644
--- a/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp
+++ b/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("attributeblueprint_test");
-
#include <vespa/searchcommon/attribute/iattributecontext.h>
#include <vespa/searchlib/attribute/attribute_blueprint_factory.h>
#include <vespa/searchlib/attribute/attributecontext.h>
@@ -18,6 +15,9 @@ LOG_SETUP("attributeblueprint_test");
#include <vespa/searchlib/queryeval/fake_requestcontext.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attributeblueprint_test");
+
using search::AttributeGuard;
using search::AttributeVector;
using search::IAttributeManager;
diff --git a/searchlib/src/tests/btree/frozenbtree_test.cpp b/searchlib/src/tests/btree/frozenbtree_test.cpp
index 871752b7a0d..988239a5438 100644
--- a/searchlib/src/tests/btree/frozenbtree_test.cpp
+++ b/searchlib/src/tests/btree/frozenbtree_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("frozenbtree_test");
-
#define DEBUG_FROZENBTREE
#define LOG_FROZENBTREEXX
#include <vespa/vespalib/testkit/testapp.h>
@@ -13,6 +10,9 @@ LOG_SETUP("frozenbtree_test");
#include <vespa/searchlib/btree/btreenodeallocator.hpp>
#include <map>
+#include <vespa/log/log.h>
+LOG_SETUP("frozenbtree_test");
+
using search::btree::BTreeRoot;
using search::btree::BTreeNode;
using search::btree::BTreeInternalNode;
diff --git a/searchlib/src/tests/btree/iteratespeed.cpp b/searchlib/src/tests/btree/iteratespeed.cpp
index 6e6029335e8..2f60b06d675 100644
--- a/searchlib/src/tests/btree/iteratespeed.cpp
+++ b/searchlib/src/tests/btree/iteratespeed.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("iteratespeed");
-
#include <vespa/searchlib/btree/btreeroot.h>
#include <vespa/searchlib/btree/btreebuilder.h>
#include <vespa/searchlib/btree/btreenodeallocator.h>
@@ -21,6 +18,9 @@ LOG_SETUP("iteratespeed");
#include <vespa/fastos/app.h>
#include <vespa/fastos/timestamp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("iteratespeed");
+
namespace search {
namespace btree {
diff --git a/searchlib/src/tests/diskindex/fusion/fusion_test.cpp b/searchlib/src/tests/diskindex/fusion/fusion_test.cpp
index 12c9d52356a..809688bdb2e 100644
--- a/searchlib/src/tests/diskindex/fusion/fusion_test.cpp
+++ b/searchlib/src/tests/diskindex/fusion/fusion_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("fusion_test");
-
#include <vespa/searchlib/diskindex/fusion.h>
#include <vespa/searchlib/diskindex/indexbuilder.h>
#include <vespa/searchlib/diskindex/zcposoccrandread.h>
@@ -21,6 +18,9 @@ LOG_SETUP("fusion_test");
#include <vespa/searchlib/util/filekit.h>
#include <vespa/searchlib/common/sequencedtaskexecutor.h>
+#include <vespa/log/log.h>
+LOG_SETUP("fusion_test");
+
namespace search {
using document::Document;
diff --git a/searchlib/src/tests/grouping/grouping_test.cpp b/searchlib/src/tests/grouping/grouping_test.cpp
index a10890fba5e..4cf9eb6f5c6 100644
--- a/searchlib/src/tests/grouping/grouping_test.cpp
+++ b/searchlib/src/tests/grouping/grouping_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("grouping_test");
-
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/aggregation/perdocexpression.h>
#include <vespa/searchlib/aggregation/aggregation.h>
@@ -16,6 +13,9 @@ LOG_SETUP("grouping_test");
#include <cmath>
#include <iostream>
+#include <vespa/log/log.h>
+LOG_SETUP("grouping_test");
+
using namespace vespalib;
using namespace search;
using namespace search::aggregation;
diff --git a/searchlib/src/tests/groupingengine/groupingengine_benchmark.cpp b/searchlib/src/tests/groupingengine/groupingengine_benchmark.cpp
index f414e298869..37aa9cc3268 100644
--- a/searchlib/src/tests/groupingengine/groupingengine_benchmark.cpp
+++ b/searchlib/src/tests/groupingengine/groupingengine_benchmark.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("grouping_benchmark");
-
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/aggregation/perdocexpression.h>
#include <vespa/searchlib/aggregation/aggregation.h>
@@ -18,6 +15,9 @@ LOG_SETUP("grouping_benchmark");
#include <vespa/vespalib/util/rusage.h>
#include <csignal>
+#include <vespa/log/log.h>
+LOG_SETUP("grouping_benchmark");
+
using namespace vespalib;
using namespace search;
using namespace search::attribute;
diff --git a/searchlib/src/tests/groupingengine/groupingengine_test.cpp b/searchlib/src/tests/groupingengine/groupingengine_test.cpp
index 06daaaca10f..a0a6c5cf4c2 100644
--- a/searchlib/src/tests/groupingengine/groupingengine_test.cpp
+++ b/searchlib/src/tests/groupingengine/groupingengine_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("grouping_engine_test");
-
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/aggregation/perdocexpression.h>
#include <vespa/searchlib/aggregation/aggregation.h>
@@ -17,6 +14,9 @@ LOG_SETUP("grouping_engine_test");
#include <cmath>
#include <iostream>
+#include <vespa/log/log.h>
+LOG_SETUP("grouping_engine_test");
+
using namespace vespalib;
using namespace search;
using namespace search::attribute;
diff --git a/searchlib/src/tests/memoryindex/dictionary/dictionary_test.cpp b/searchlib/src/tests/memoryindex/dictionary/dictionary_test.cpp
index 8e921712cf6..c926d1c2831 100644
--- a/searchlib/src/tests/memoryindex/dictionary/dictionary_test.cpp
+++ b/searchlib/src/tests/memoryindex/dictionary/dictionary_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("dictionary_test");
-
#include <vespa/searchlib/diskindex/fusion.h>
#include <vespa/searchlib/diskindex/indexbuilder.h>
#include <vespa/searchlib/diskindex/zcposoccrandread.h>
@@ -21,6 +18,9 @@ LOG_SETUP("dictionary_test");
#include <vespa/searchlib/test/searchiteratorverifier.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("dictionary_test");
+
namespace search {
using namespace btree;
diff --git a/searchlib/src/tests/predicate/simple_index_test.cpp b/searchlib/src/tests/predicate/simple_index_test.cpp
index 30cc0b2e4bb..fbb0a5933c9 100644
--- a/searchlib/src/tests/predicate/simple_index_test.cpp
+++ b/searchlib/src/tests/predicate/simple_index_test.cpp
@@ -1,13 +1,13 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Unit tests for simple_index.
-#include <vespa/log/log.h>
-LOG_SETUP("simple_index_test");
-
#include <vespa/searchlib/predicate/simple_index.hpp>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/attribute/predicate_attribute.h>
+#include <vespa/log/log.h>
+LOG_SETUP("simple_index_test");
+
using namespace search;
using namespace search::predicate;
using vespalib::GenerationHolder;
diff --git a/searchlib/src/tests/queryeval/queryeval.cpp b/searchlib/src/tests/queryeval/queryeval.cpp
index 1ad0b643799..9f4d8403d76 100644
--- a/searchlib/src/tests/queryeval/queryeval.cpp
+++ b/searchlib/src/tests/queryeval/queryeval.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("query_eval_test");
-
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/searchlib/test/initrange.h>
#include <vespa/searchlib/common/bitvectoriterator.h>
@@ -21,9 +18,11 @@ LOG_SETUP("query_eval_test");
#include <vespa/searchlib/attribute/singlenumericattribute.hpp>
#include <vespa/vespalib/test/insertion_operators.h>
#include <vespa/searchlib/queryeval/isourceselector.h>
-
#include <vespa/searchlib/fef/fef.h>
+#include <vespa/log/log.h>
+LOG_SETUP("query_eval_test");
+
using namespace search::queryeval;
using search::BitVector;
using search::BitVectorIterator;
diff --git a/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp b/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp
index a23c9b091c8..28310c65862 100644
--- a/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp
@@ -1,8 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "attribute_blueprint_factory.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.attribute_blueprint_factory");
#include "attribute_weighted_set_blueprint.h"
#include "i_document_weight_attribute.h"
#include "iterator_pack.h"
@@ -27,10 +25,12 @@ LOG_SETUP(".searchlib.attribute.attribute_blueprint_factory");
#include <vespa/searchlib/queryeval/weighted_set_term_search.h>
#include <vespa/searchlib/queryeval/weighted_set_term_blueprint.h>
#include <vespa/searchlib/queryeval/get_weight_from_node.h>
-
#include <vespa/vespalib/util/regexp.h>
#include <sstream>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.attribute_blueprint_factory");
+
using search::attribute::IAttributeVector;
using search::attribute::ISearchContext;
using search::fef::TermFieldMatchData;
diff --git a/searchlib/src/vespa/searchlib/attribute/attributeiterators.cpp b/searchlib/src/vespa/searchlib/attribute/attributeiterators.cpp
index 95e0c389393..3c8040c9d0d 100644
--- a/searchlib/src/vespa/searchlib/attribute/attributeiterators.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attributeiterators.cpp
@@ -1,12 +1,11 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include "attributeiterators.hpp"
+#include "postinglistattribute.h"
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.attribute_iterators");
-#include "attributeiterators.hpp"
-#include "postinglistattribute.h"
-
namespace search {
using queryeval::MinMaxPostingInfo;
diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp
index 3deed2ed33f..32e21bdd122 100644
--- a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp
@@ -1,9 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "attributevector.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.attributevector");
-
#include "attribute_read_guard.h"
#include "attributefilesavetarget.h"
#include "attributeiterators.hpp"
@@ -24,6 +21,9 @@ LOG_SETUP(".searchlib.attribute.attributevector");
#include <vespa/searchlib/queryeval/emptysearch.h>
#include <vespa/vespalib/util/exceptions.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.attributevector");
+
using vespalib::getLastErrorString;
using document::ValueUpdate;
diff --git a/searchlib/src/vespa/searchlib/attribute/attrvector.cpp b/searchlib/src/vespa/searchlib/attribute/attrvector.cpp
index 09d8547ada0..94b847a02e6 100644
--- a/searchlib/src/vespa/searchlib/attribute/attrvector.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attrvector.cpp
@@ -1,11 +1,12 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "attrvector.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.attr_vector");
#include "attrvector.hpp"
#include "iattributesavetarget.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.attr_vector");
+
namespace search {
StringDirectAttribute::
diff --git a/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp b/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp
index 40a22d98533..9e2d4d764e7 100644
--- a/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp
@@ -1,7 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.create_array_std");
#include "attributefactory.h"
#include "defines.h"
#include "attributevector.hpp"
@@ -9,6 +7,9 @@ LOG_SETUP(".searchlib.attribute.create_array_std");
#include "multinumericattribute.hpp"
#include "multistringattribute.hpp"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.create_array_std");
+
namespace search {
using attribute::BasicType;
diff --git a/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp b/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp
index 80c03b42e57..8ef75de2b44 100644
--- a/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp
@@ -1,7 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.create_set_std");
#include "attributefactory.h"
#include "defines.h"
#include "attributevector.hpp"
@@ -9,6 +7,9 @@ LOG_SETUP(".searchlib.attribute.create_set_std");
#include "multinumericattribute.hpp"
#include "multistringattribute.hpp"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.create_set_std");
+
namespace search {
using attribute::BasicType;
diff --git a/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp b/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp
index d55f0ee8063..ec200124286 100644
--- a/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.create_single_fast_search");
-
#include "attributefactory.h"
#include "integerbase.h"
#include "floatbase.h"
@@ -15,6 +12,9 @@ LOG_SETUP(".searchlib.attribute.create_single_fast_search");
#include "enumattribute.hpp"
#include "singleenumattribute.hpp"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.create_single_fast_search");
+
#define INTPOSTING(T) SingleValueNumericPostingAttribute< ENUM_ATTRIBUTE(IntegerAttributeTemplate<T>) >
#define FLOATPOSTING(T) SingleValueNumericPostingAttribute< ENUM_ATTRIBUTE(FloatingPointAttributeTemplate<T>) >
diff --git a/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp b/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp
index 5a6bddb1cd5..6fefc7a1852 100644
--- a/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp
@@ -1,9 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.create_single_std");
-
#include "attributefactory.h"
#include "predicate_attribute.h"
#include "singlesmallnumericattribute.h"
@@ -14,6 +10,9 @@ LOG_SETUP(".searchlib.attribute.create_single_std");
#include <vespa/searchlib/tensor/generic_tensor_attribute.h>
#include <vespa/searchlib/tensor/dense_tensor_attribute.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.create_single_std");
+
namespace search {
using attribute::BasicType;
diff --git a/searchlib/src/vespa/searchlib/attribute/enumattribute.cpp b/searchlib/src/vespa/searchlib/attribute/enumattribute.cpp
index d8b6519ef5b..a894bc63d49 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumattribute.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "enumattribute.h"
+#include "enumattribute.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.enum_attribute");
-#include "enumattribute.hpp"
namespace search {
diff --git a/searchlib/src/vespa/searchlib/attribute/enumcomparator.cpp b/searchlib/src/vespa/searchlib/attribute/enumcomparator.cpp
index ed482263566..bf323d56245 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumcomparator.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumcomparator.cpp
@@ -1,11 +1,12 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "enumcomparator.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.enum_comparator");
#include "enumstore.hpp"
#include <vespa/searchlib/util/foldedstringcompare.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.enum_comparator");
+
namespace search {
namespace {
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.cpp b/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
index 65ae627a192..e0f46ffe111 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
@@ -1,11 +1,12 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "enumstore.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.enum_store");
#include "enumstore.hpp"
#include <iomanip>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.enum_store");
+
namespace search {
template <>
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstorebase.cpp b/searchlib/src/vespa/searchlib/attribute/enumstorebase.cpp
index c66432df245..914a56e7abc 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstorebase.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumstorebase.cpp
@@ -1,8 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "enumstorebase.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.enumstorebase");
#include "enumstore.h"
#include <vespa/searchlib/datastore/datastore.hpp>
#include <vespa/vespalib/util/exceptions.h>
@@ -11,6 +9,9 @@ LOG_SETUP(".searchlib.attribute.enumstorebase");
#include <vespa/searchlib/util/bufferwriter.h>
#include <vespa/searchlib/common/rcuvector.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.enumstorebase");
+
namespace search {
using btree::BTreeNode;
diff --git a/searchlib/src/vespa/searchlib/attribute/extendableattributes.cpp b/searchlib/src/vespa/searchlib/attribute/extendableattributes.cpp
index 9a69747870e..feac5caabd5 100644
--- a/searchlib/src/vespa/searchlib/attribute/extendableattributes.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/extendableattributes.cpp
@@ -1,11 +1,11 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.extendable_attributes");
-
#include "extendableattributes.h"
#include "attrvector.hpp"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.extendable_attributes");
+
namespace search {
//******************** CollectionType::SINGLE ********************//
diff --git a/searchlib/src/vespa/searchlib/attribute/fixedsourceselector.cpp b/searchlib/src/vespa/searchlib/attribute/fixedsourceselector.cpp
index f2db7b5b47a..ae2f0234e60 100644
--- a/searchlib/src/vespa/searchlib/attribute/fixedsourceselector.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/fixedsourceselector.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "fixedsourceselector.h"
+#include "singlenumericattribute.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.fixed_source_selector");
-#include "singlenumericattribute.hpp"
namespace search {
diff --git a/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp b/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp
index dde09761343..0e5027ea46e 100644
--- a/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp
@@ -1,8 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "flagattribute.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.flag_attribute");
#include "load_utils.hpp"
#include "attributeiterators.h"
#include "multinumericattribute.hpp"
@@ -10,6 +8,9 @@ LOG_SETUP(".searchlib.attribute.flag_attribute");
#include <vespa/searchlib/queryeval/emptysearch.h>
#include <vespa/searchlib/common/bitvectoriterator.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.flag_attribute");
+
namespace search {
using queryeval::SearchIterator;
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp b/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp
index 4302725a8b7..9ee8612c52a 100644
--- a/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp
@@ -1,9 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "imported_search_context.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.imported_search_context");
-
#include "bitvector_search_cache.h"
#include "imported_attribute_vector.h"
#include "reference_attribute.h"
@@ -11,6 +8,9 @@ LOG_SETUP(".searchlib.attribute.imported_search_context");
#include <vespa/searchlib/queryeval/emptysearch.h>
#include "attributeiterators.hpp"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.imported_search_context");
+
using search::datastore::EntryRef;
using search::queryeval::EmptySearch;
using search::queryeval::SearchIterator;
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.cpp b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.cpp
index 38af12380a9..e16474e45a8 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "multinumericattribute.h"
+#include "multinumericattribute.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.multi_numeric_attribute");
-#include "multinumericattribute.hpp"
namespace search {
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.cpp b/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.cpp
index 3875c563bab..0e5efe21de0 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "multinumericenumattribute.h"
+#include "multinumericenumattribute.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.multi_numeric_enum_attribute");
-#include "multinumericenumattribute.hpp"
namespace search {
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.cpp b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.cpp
index 32dd578fd4a..75e05d61b13 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "multistringpostattribute.h"
+#include "multistringpostattribute.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.multi_string_post_attribute");
-#include "multistringpostattribute.hpp"
namespace search {
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.cpp b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.cpp
index 6f67a2162da..1cfb0ab1191 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.cpp
@@ -1,13 +1,13 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "postinglistsearchcontext.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.posting_list_search_context");
#include "postinglistsearchcontext.hpp"
#include "attributeiterators.hpp"
#include "diversity.hpp"
#include <vespa/searchlib/btree/btreeiterator.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.posting_list_search_context");
namespace search {
diff --git a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
index 86f658a0be2..a0fa7e35054 100644
--- a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
@@ -1,14 +1,15 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "postingstore.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.posting_store");
#include <vespa/searchlib/datastore/datastore.hpp>
#include <vespa/searchlib/btree/btreeiterator.hpp>
#include <vespa/searchlib/common/growablebitvector.h>
#include <vespa/searchcommon/attribute/config.h>
#include <vespa/searchcommon/attribute/status.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.posting_store");
+
namespace search::attribute {
using btree::BTreeNoLeafData;
diff --git a/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp
index 49dcb9297b6..424405a520e 100644
--- a/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp
@@ -1,7 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.predicate_attribute");
#include "predicate_attribute.h"
#include <vespa/searchlib/util/fileutil.h>
#include <vespa/document/fieldvalue/predicatefieldvalue.h>
@@ -10,6 +8,9 @@ LOG_SETUP(".searchlib.attribute.predicate_attribute");
#include "iattributesavetarget.h"
#include "attribute_header.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.predicate_attribute");
+
using document::Predicate;
using document::PredicateFieldValue;
using vespalib::DataBuffer;
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
index 87fe4bd3a2b..050954157da 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
@@ -1,8 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "reference_attribute.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.reference_attribute");
#include "reference_attribute_saver.h"
#include "attributesaver.h"
#include "readerbase.h"
@@ -13,6 +11,9 @@ LOG_SETUP(".searchlib.attribute.reference_attribute");
#include <vespa/searchlib/common/i_gid_to_lid_mapper.h>
#include <vespa/vespalib/data/fileheader.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.reference_attribute");
+
namespace search::attribute {
namespace {
diff --git a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.cpp
index 41cfb972ad0..0e122c9d583 100644
--- a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "singleenumattribute.h"
+#include "singleenumattribute.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.single_enum_attribute");
-#include "singleenumattribute.hpp"
namespace search {
diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.cpp
index 3f497f613a2..ef92e94aa95 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "singlenumericattribute.h"
+#include "singlenumericattribute.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.single_numeric_attribute");
-#include "singlenumericattribute.hpp"
namespace search {
diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.cpp
index bedf3dc564f..6c831cade89 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "singlenumericenumattribute.h"
+#include "singlenumericenumattribute.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.single_numeric_enum_attribute");
-#include "singlenumericenumattribute.hpp"
namespace search {
diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.cpp
index d5626d1d092..9de02dbeaf9 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "singlenumericpostattribute.h"
+#include "singlenumericpostattribute.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.single_numeric_post_attribute");
-#include "singlenumericpostattribute.hpp"
namespace search {
diff --git a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp
index ce02b9b4725..5100e2e5546 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp
@@ -1,14 +1,15 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "singlesmallnumericattribute.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.asingle_small_numeric_attribute");
#include "attributevector.hpp"
#include "primitivereader.h"
#include "attributeiterators.hpp"
#include <vespa/searchlib/queryeval/emptysearch.h>
#include "iattributesavetarget.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.attribute.single_small_numeric_attribute");
+
namespace search {
SingleValueSmallNumericAttribute::
diff --git a/searchlib/src/vespa/searchlib/attribute/singlestringattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singlestringattribute.cpp
index 54b9eb7ed81..195926f656f 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlestringattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlestringattribute.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "singlestringattribute.h"
+#include "singlestringattribute.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.attribute.single_string_attribute");
-#include "singlestringattribute.hpp"
namespace search {
diff --git a/searchlib/src/vespa/searchlib/btree/btreeinserter.cpp b/searchlib/src/vespa/searchlib/btree/btreeinserter.cpp
index d5ac368ce77..f307c474f90 100644
--- a/searchlib/src/vespa/searchlib/btree/btreeinserter.cpp
+++ b/searchlib/src/vespa/searchlib/btree/btreeinserter.cpp
@@ -1,15 +1,14 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "btreeinserter.h"
-
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.btree.btreeinserter");
-
#include "btreenodeallocator.h"
#include "btreerootbase.hpp"
#include "btreeinserter.hpp"
#include "btreenode.hpp"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.btree.btreeinserter");
+
namespace search::btree {
template class BTreeInserter<uint32_t, uint32_t, NoAggregated>;
diff --git a/searchlib/src/vespa/searchlib/btree/btreeiterator.cpp b/searchlib/src/vespa/searchlib/btree/btreeiterator.cpp
index b4ccbfed9e0..08ad4345289 100644
--- a/searchlib/src/vespa/searchlib/btree/btreeiterator.cpp
+++ b/searchlib/src/vespa/searchlib/btree/btreeiterator.cpp
@@ -1,13 +1,14 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "btreeiterator.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.btree.breeiterator");
#include "btreeroot.h"
#include "btreenodeallocator.h"
#include "btreeiterator.hpp"
#include "btreenode.hpp"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.btree.breeiterator");
+
namespace search::btree {
template class BTreeIteratorBase<uint32_t, uint32_t, NoAggregated>;
diff --git a/searchlib/src/vespa/searchlib/btree/btreeroot.cpp b/searchlib/src/vespa/searchlib/btree/btreeroot.cpp
index cce157c0cbc..60c44f7973e 100644
--- a/searchlib/src/vespa/searchlib/btree/btreeroot.cpp
+++ b/searchlib/src/vespa/searchlib/btree/btreeroot.cpp
@@ -1,15 +1,14 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "btreeroot.h"
-
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.btree.btreeroot");
-
#include "btreenodeallocator.h"
#include "btreeiterator.hpp"
#include "btreeroot.hpp"
#include "btreenode.hpp"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.btree.btreeroot");
+
namespace search::btree {
template class BTreeRootT<uint32_t, uint32_t, NoAggregated>;
diff --git a/searchlib/src/vespa/searchlib/btree/btreestore.cpp b/searchlib/src/vespa/searchlib/btree/btreestore.cpp
index f183d4d4f15..4467aad15d5 100644
--- a/searchlib/src/vespa/searchlib/btree/btreestore.cpp
+++ b/searchlib/src/vespa/searchlib/btree/btreestore.cpp
@@ -1,11 +1,12 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "btreestore.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.btree.breestore");
#include "btreestore.hpp"
#include "btreeiterator.hpp"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.btree.breestore");
+
namespace search::btree {
template class BTreeStore<uint32_t, uint32_t,
diff --git a/searchlib/src/vespa/searchlib/memoryindex/dictionary.cpp b/searchlib/src/vespa/searchlib/memoryindex/dictionary.cpp
index 66fed0e4262..accf227b96c 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/dictionary.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/dictionary.cpp
@@ -4,9 +4,6 @@
#include "fieldinverter.h"
#include <vespa/searchlib/bitcompression/posocccompression.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.memoryindex.dictionary");
-
#include <vespa/searchlib/btree/btreenode.hpp>
#include <vespa/searchlib/btree/btreenodeallocator.hpp>
#include <vespa/searchlib/btree/btreenodestore.hpp>
@@ -17,6 +14,9 @@ LOG_SETUP(".searchlib.memoryindex.dictionary");
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/util/exceptions.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.memoryindex.dictionary");
+
namespace search {
diff --git a/searchlib/src/vespa/searchlib/memoryindex/memoryfieldindex.cpp b/searchlib/src/vespa/searchlib/memoryindex/memoryfieldindex.cpp
index f201d4c2572..733adef97da 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/memoryfieldindex.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/memoryfieldindex.cpp
@@ -1,14 +1,9 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "memoryfieldindex.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.memoryindex.memory_field_index");
-
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/util/exceptions.h>
-
#include <vespa/searchlib/bitcompression/posocccompression.h>
-
#include <vespa/searchlib/btree/btreenode.hpp>
#include <vespa/searchlib/btree/btreenodeallocator.hpp>
#include <vespa/searchlib/btree/btreenodestore.hpp>
@@ -19,6 +14,9 @@ LOG_SETUP(".searchlib.memoryindex.memory_field_index");
#include "ordereddocumentinserter.h"
#include <vespa/vespalib/util/array.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.memoryindex.memory_field_index");
+
namespace search {
using index::DocIdAndFeatures;
diff --git a/searchlib/src/vespa/searchlib/memoryindex/ordereddocumentinserter.cpp b/searchlib/src/vespa/searchlib/memoryindex/ordereddocumentinserter.cpp
index 3df56dd095c..b1e365c7fd7 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/ordereddocumentinserter.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/ordereddocumentinserter.cpp
@@ -1,8 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "ordereddocumentinserter.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.memoryindex.ordered_document_inserter");
#include "i_document_insert_listener.h"
#include <vespa/searchlib/index/docidandfeatures.h>
@@ -18,6 +16,9 @@ LOG_SETUP(".searchlib.memoryindex.ordered_document_inserter");
#include <vespa/searchlib/btree/btreeroot.hpp>
#include <vespa/searchlib/btree/btree.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.memoryindex.ordered_document_inserter");
+
namespace search::memoryindex {
namespace {
diff --git a/searchlib/src/vespa/searchlib/memoryindex/postingiterator.cpp b/searchlib/src/vespa/searchlib/memoryindex/postingiterator.cpp
index f23fc380bbe..1f55aa466b1 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/postingiterator.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/postingiterator.cpp
@@ -1,15 +1,15 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "postingiterator.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.memoryindex.postingiterator");
-
#include <vespa/searchlib/btree/btreenode.hpp>
#include <vespa/searchlib/btree/btreenodeallocator.hpp>
#include <vespa/searchlib/btree/btreenodestore.hpp>
#include <vespa/searchlib/btree/btreeiterator.hpp>
#include <vespa/searchlib/btree/btreeroot.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.memoryindex.postingiterator");
+
namespace search {
namespace memoryindex {
diff --git a/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp b/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp
index c22d05c5e32..b5d1d9ec1e0 100644
--- a/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp
@@ -1,8 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "document_features_store.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.predicate.document_features_store");
#include "predicate_index.h"
#include "predicate_range_expander.h"
#include "predicate_tree_annotator.h"
@@ -12,6 +10,9 @@ LOG_SETUP(".searchlib.predicate.document_features_store");
#include <unordered_map>
#include <vector>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.predicate.document_features_store");
+
using search::btree::BTreeNoLeafData;
using search::datastore::EntryRef;
using vespalib::DataBuffer;
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp b/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp
index b83b66f997f..1336f35628e 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp
@@ -1,10 +1,11 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.predicate.predicate_index");
#include "predicate_index.h"
#include "predicate_hash.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.predicate.predicate_index");
+
using search::datastore::EntryRef;
using vespalib::DataBuffer;
using std::vector;
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp b/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp
index f84cbac2b95..a0a8c690b5a 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp
@@ -1,14 +1,14 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "predicate_interval_store.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.predicate.predicate_interval_store");
-
#include "predicate_index.h"
#include <vespa/searchlib/datastore/bufferstate.h>
#include <vespa/searchlib/datastore/datastore.hpp>
#include <vespa/searchlib/datastore/entryref.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.predicate.predicate_interval_store");
+
using search::datastore::BufferState;
using search::datastore::EntryRef;
using std::vector;
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_tree_annotator.cpp b/searchlib/src/vespa/searchlib/predicate/predicate_tree_annotator.cpp
index 7dc5cca376e..3b395f155b8 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_tree_annotator.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_tree_annotator.cpp
@@ -1,13 +1,14 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "predicate_tree_annotator.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.predicate.predicate_tree_annotator");
#include "predicate_index.h"
#include "predicate_range_expander.h"
#include "predicate_tree_analyzer.h"
#include <vespa/document/predicate/predicate.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.predicate.predicate_tree_annotator");
+
using document::Predicate;
using std::map;
using std::string;
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_zero_constraint_posting_list.cpp b/searchlib/src/vespa/searchlib/predicate/predicate_zero_constraint_posting_list.cpp
index 7a57699a494..757bc489179 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_zero_constraint_posting_list.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_zero_constraint_posting_list.cpp
@@ -1,10 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include "predicate_zero_constraint_posting_list.h"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.predicate.predicate_zero_constraint_posting_list");
-#include "predicate_zero_constraint_posting_list.h"
-
namespace search {
namespace predicate {
diff --git a/searchlib/src/vespa/searchlib/predicate/simple_index.cpp b/searchlib/src/vespa/searchlib/predicate/simple_index.cpp
index 0e562681a3e..1ca8fd259c6 100644
--- a/searchlib/src/vespa/searchlib/predicate/simple_index.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/simple_index.cpp
@@ -1,10 +1,11 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.predicate.simple_index");
#include "simple_index.hpp"
#include <vespa/vespalib/util/array.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.predicate.simple_index");
+
namespace search {
namespace predicate {
namespace simpleindex {
diff --git a/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.cpp
index 7bac71552c6..3e6228053ab 100644
--- a/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/predicate_blueprint.cpp
@@ -1,7 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.predicate.predicate_blueprint");
#include "predicate_blueprint.h"
#include <vespa/searchlib/predicate/predicate_bounds_posting_list.h>
#include <vespa/searchlib/predicate/predicate_interval_posting_list.h>
@@ -9,7 +7,8 @@ LOG_SETUP(".searchlib.predicate.predicate_blueprint");
#include <vespa/searchlib/predicate/predicate_zstar_compressed_posting_list.h>
#include <vespa/searchlib/predicate/predicate_hash.h>
#include <vespa/searchlib/query/tree/termnodes.h>
-
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.predicate.predicate_blueprint");
#include <vespa/searchlib/predicate/predicate_range_term_expander.h>
using search::query::PredicateQuery;
diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp
index 02a9a339807..bbd50e468e2 100644
--- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp
@@ -1,8 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "dense_tensor_attribute.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.tensor.dense_tensor_attribute");
#include "dense_tensor_attribute_saver.h"
#include "tensor_attribute.hpp"
#include <vespa/eval/tensor/tensor.h>
@@ -10,6 +8,9 @@ LOG_SETUP(".searchlib.tensor.dense_tensor_attribute");
#include <vespa/fastlib/io/bufferedfile.h>
#include <vespa/searchlib/attribute/readerbase.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".searchlib.tensor.dense_tensor_attribute");
+
using vespalib::eval::ValueType;
using vespalib::tensor::MutableDenseTensorView;
using vespalib::tensor::Tensor;
diff --git a/searchlib/src/vespa/searchlib/test/fakedata/fakeegcompr64filterocc.cpp b/searchlib/src/vespa/searchlib/test/fakedata/fakeegcompr64filterocc.cpp
index 10f7c7c5326..7eda569924c 100644
--- a/searchlib/src/vespa/searchlib/test/fakedata/fakeegcompr64filterocc.cpp
+++ b/searchlib/src/vespa/searchlib/test/fakedata/fakeegcompr64filterocc.cpp
@@ -4,6 +4,7 @@
#include "fpfactory.h"
#include <vespa/searchlib/queryeval/iterators.h>
#include <vespa/vespalib/util/stringfmt.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.test.fake_eg_compr64_filter_occ");
diff --git a/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.cpp b/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.cpp
index d6df63681ed..8bbcdf9d359 100644
--- a/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.cpp
+++ b/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.cpp
@@ -2,8 +2,6 @@
#include "fakememtreeocc.h"
#include "fpfactory.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".fakememtreeocc");
#include <vespa/searchlib/queryeval/iterators.h>
#include <vespa/searchlib/btree/btreeroot.hpp>
#include <vespa/searchlib/btree/btreeiterator.hpp>
@@ -13,6 +11,9 @@ LOG_SETUP(".fakememtreeocc");
#include <vespa/searchlib/memoryindex/postingiterator.h>
#include <vespa/searchlib/util/postingpriorityqueue.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".fakememtreeocc");
+
using search::fef::TermFieldMatchData;
using search::fef::TermFieldMatchDataPosition;
diff --git a/storage/src/tests/bucketdb/judymultimaptest.cpp b/storage/src/tests/bucketdb/judymultimaptest.cpp
index 28504e3abed..43b83b16dec 100644
--- a/storage/src/tests/bucketdb/judymultimaptest.cpp
+++ b/storage/src/tests/bucketdb/judymultimaptest.cpp
@@ -1,7 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".judy_multi_map_test");
#include <vespa/storage/bucketdb/judymultimap.h>
#include <vespa/storage/bucketdb/judymultimap.hpp>
#include <vespa/vdstestlib/cppunit/macros.h>
@@ -12,6 +10,9 @@ LOG_SETUP(".judy_multi_map_test");
#include <ostream>
#include <vector>
+#include <vespa/log/log.h>
+LOG_SETUP(".judy_multi_map_test");
+
namespace storage {
struct JudyMultiMapTest : public CppUnit::TestFixture {
diff --git a/storage/src/tests/bucketdb/lockablemaptest.cpp b/storage/src/tests/bucketdb/lockablemaptest.cpp
index 46928ee51ae..c94121062ec 100644
--- a/storage/src/tests/bucketdb/lockablemaptest.cpp
+++ b/storage/src/tests/bucketdb/lockablemaptest.cpp
@@ -1,7 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".lockable_map_test");
#include <vespa/vespalib/util/document_runnable.h>
#include <vespa/storage/bucketdb/judymultimap.h>
#include <vespa/storage/bucketdb/judymultimap.hpp>
@@ -10,6 +8,9 @@ LOG_SETUP(".lockable_map_test");
#include <cppunit/extensions/HelperMacros.h>
#include <boost/operators.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP(".lockable_map_test");
+
namespace storage {
struct LockableMapTest : public CppUnit::TestFixture {
diff --git a/storage/src/vespa/storage/bucketdb/storbucketdb.cpp b/storage/src/vespa/storage/bucketdb/storbucketdb.cpp
index 83787bde55f..df9e8e4e5b5 100644
--- a/storage/src/vespa/storage/bucketdb/storbucketdb.cpp
+++ b/storage/src/vespa/storage/bucketdb/storbucketdb.cpp
@@ -1,9 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "storbucketdb.h"
+#include "judymultimap.hpp"
+
#include <vespa/log/log.h>
LOG_SETUP(".storage.bucketdb.stor_bucket_db");
-#include "judymultimap.hpp"
namespace storage {
namespace bucketdb {
diff --git a/storage/src/vespa/storage/bucketmover/bucketmover.cpp b/storage/src/vespa/storage/bucketmover/bucketmover.cpp
index 822cb0b16ae..b47b3b59b4f 100644
--- a/storage/src/vespa/storage/bucketmover/bucketmover.cpp
+++ b/storage/src/vespa/storage/bucketmover/bucketmover.cpp
@@ -1,8 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "bucketmover.h"
-#include <vespa/log/bufferedlogger.h>
-LOG_SETUP(".bucketmover");
#include "htmltable.h"
#include <vespa/storage/config/config-stor-server.h>
#include <vespa/storage/common/bucketmessages.h>
@@ -14,6 +12,9 @@ LOG_SETUP(".bucketmover");
#include <vespa/document/bucket/fixed_bucket_spaces.h>
#include <thread>
+#include <vespa/log/bufferedlogger.h>
+LOG_SETUP(".bucketmover");
+
namespace storage::bucketmover {
BucketMover::BucketMover(const config::ConfigUri & configUri,
diff --git a/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp b/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp
index 48d0b833063..377febb6cc2 100644
--- a/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp
+++ b/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp
@@ -1,12 +1,12 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".storageserver.service_layer_process");
-
#include "servicelayerprocess.h"
#include <vespa/storage/storageserver/servicelayernode.h>
#include <vespa/searchvisitor/searchvisitor.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".storageserver.service_layer_process");
+
namespace storage {
ServiceLayerProcess::ServiceLayerProcess(const config::ConfigUri & configUri)
diff --git a/streamingvisitors/src/tests/searchvisitor/searchvisitor.cpp b/streamingvisitors/src/tests/searchvisitor/searchvisitor.cpp
index 19d67b623eb..8d3d291c94f 100644
--- a/streamingvisitors/src/tests/searchvisitor/searchvisitor.cpp
+++ b/streamingvisitors/src/tests/searchvisitor/searchvisitor.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("searchvisitor_test");
-
#include <vespa/document/base/testdocrepo.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/testkit/testapp.h>
@@ -14,6 +11,9 @@ LOG_SETUP("searchvisitor_test");
#include <vespa/storage/frameworkimpl/component/storagecomponentregisterimpl.h>
#include <vespa/storageframework/defaultimplementation/clock/fakeclock.h>
+#include <vespa/log/log.h>
+LOG_SETUP("searchvisitor_test");
+
using namespace search;
using namespace search::query;
using namespace document;
diff --git a/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp b/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp
index f10d934bd2d..f42dfe5af98 100644
--- a/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp
+++ b/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP(".visitor.instance.searchvisitor");
-
#include "querytermdata.h"
#include "searchenvironment.h"
#include "searchvisitor.h"
@@ -19,6 +16,9 @@ LOG_SETUP(".visitor.instance.searchvisitor");
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/util/exceptions.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".visitor.instance.searchvisitor");
+
namespace storage {
using vsm::DocsumFilter;
diff --git a/vespalib/src/vespa/vespalib/stllike/asciistream.cpp b/vespalib/src/vespa/vespalib/stllike/asciistream.cpp
index cf7fdebb401..1be24175ede 100644
--- a/vespalib/src/vespa/vespalib/stllike/asciistream.cpp
+++ b/vespalib/src/vespa/vespalib/stllike/asciistream.cpp
@@ -10,6 +10,7 @@
#include <limits>
#include <stdexcept>
#include <cassert>
+
#include <vespa/log/log.h>
LOG_SETUP(".vespalib.stllike.asciistream");
diff --git a/vespalib/src/vespa/vespalib/testkit/test_master.cpp b/vespalib/src/vespa/vespalib/testkit/test_master.cpp
index 49ee3d6da94..81ac6b65851 100644
--- a/vespalib/src/vespa/vespalib/testkit/test_master.cpp
+++ b/vespalib/src/vespa/vespalib/testkit/test_master.cpp
@@ -3,6 +3,7 @@
#include "test_master.h"
#include <vespa/vespalib/util/barrier.h>
#include <cstring>
+
#include <vespa/log/log.h>
LOG_SETUP(".vespalib.testkit.test_master");