aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/storageserver/config_logging.cpp
blob: 81bc8e5cc3f9b549aef59cd6c8e5042e521b03ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "config_logging.h"
#include <vespa/config/configgen/configinstance.h>
#include <vespa/config/print/configdatabuffer.h>
#include <vespa/vespalib/data/slime/slime.h>

#include <vespa/log/log.h>

LOG_SETUP(".storageserver.config_logging");

namespace storage {

void log_config_received(const config::ConfigInstance& cfg) {
    if (LOG_WOULD_LOG(debug)) {
        config::ConfigDataBuffer buf;
        cfg.serialize(buf);
        LOG(debug, "Received new %s config: %s", cfg.defName().c_str(), buf.slimeObject().toString().c_str());
    }
}

}