aboutsummaryrefslogtreecommitdiffstats
path: root/metrics/src/vespa/metrics/countmetric.cpp
blob: 0eb83903a7599cc7f7eee0b821819a54aebb44b3 (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 Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "countmetric.hpp"
#include <vespa/vespalib/stllike/asciistream.h>

#include <vespa/log/log.h>

LOG_SETUP(".metrics.metric.count");

namespace metrics {

void
AbstractCountMetric::logWarning(const char* msg, const char * op) const
{
    vespalib::asciistream ost;
    ost << msg << " in count metric " << getPath() << " op " << op << ". Resetting it.";
    LOG(warning, "%s", ost.str().data());
}

template class CountMetric<uint64_t, true>;

} // metrics