aboutsummaryrefslogtreecommitdiffstats
path: root/logforwarder/src/apps/vespa-logforwarder-start/splunk-stopper.cpp
blob: 2da8a1acd5c1f6517d3d88b30b02339a4615eec4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "splunk-stopper.h"
#include "child-handler.h"

#include <vespa/log/log.h>
LOG_SETUP(".splunk-stopper");

SplunkStopper::SplunkStopper(const char *configId) {
    start(configId);
}

SplunkStopper::~SplunkStopper() = default;

void SplunkStopper::gotConfig(const LogforwarderConfig& config) {
    LOG(debug, "got config with splunk home '%s'", config.splunkHome.c_str());
    ChildHandler().stopChild(config.splunkHome);
}