mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 09:58:54 +00:00
Properly intialize BufferedLogForwarder for TLS output plugin (#2328)
Missing initialization of the BufferedLogForwarder was causing an underflow in the count of buffered logs, and error messages as described in #2324. This commit brings the initialization of the forwarder for TLS in line with aws_kinesis and aws_firehose, removing that error.
This commit is contained in:
parent
ec57595620
commit
8aa9d63c42
@ -65,9 +65,17 @@ Status TLSLoggerPlugin::setUp() {
|
||||
// Could not generate a node key, continue logging to stderr.
|
||||
return Status(1, "No node key, TLS logging disabled.");
|
||||
}
|
||||
|
||||
// Start the log forwarding/flushing thread.
|
||||
forwarder_ = std::make_shared<TLSLogForwarder>(node_key);
|
||||
Status s = forwarder_->setUp();
|
||||
if (!s.ok()) {
|
||||
LOG(ERROR) << "Error initializing TLS logger: " << s.getMessage();
|
||||
return s;
|
||||
}
|
||||
|
||||
Dispatcher::addService(forwarder_);
|
||||
|
||||
return Status(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user