Add a log message for RedisWriter on start and stop

fixes #5006

Signed-off-by: Gunnar Beutner <gunnar.beutner@icinga.com>
This commit is contained in:
Rune Darrud 2017-02-15 14:01:38 +01:00 committed by Gunnar Beutner
parent 8627ca0b1a
commit e6ae582104
2 changed files with 12 additions and 0 deletions

View File

@ -33,6 +33,9 @@ void RedisWriter::Start(bool runtimeCreated)
{
ObjectImpl<RedisWriter>::Start(runtimeCreated);
Log(LogInformation, "RedisWriter")
<< "'" << GetName() << "' started.";
boost::thread thread(boost::bind(&RedisWriter::ConnectionThreadProc, this));
thread.detach();
}
@ -141,3 +144,11 @@ void RedisWriter::HandleEvents(void)
queue->RemoveClient(this);
EventQueue::UnregisterIfUnused(queueName, queue);
}
void RedisWriter::Stop(bool runtimeRemoved)
{
Log(LogInformation, "RedisWriter")
<< "'" << GetName() << "' stopped.";
ObjectImpl<RedisWriter>::Stop(runtimeRemoved);
}

View File

@ -38,6 +38,7 @@ public:
DECLARE_OBJECTNAME(RedisWriter);
virtual void Start(bool runtimeCreated) override;
virtual void Stop(bool runtimeRemoved) override;
private:
void ConnectionThreadProc(void);