From e6ae582104d30bfb7138f2aaecc06682640847eb Mon Sep 17 00:00:00 2001 From: Rune Darrud Date: Wed, 15 Feb 2017 14:01:38 +0100 Subject: [PATCH] Add a log message for RedisWriter on start and stop fixes #5006 Signed-off-by: Gunnar Beutner --- lib/redis/rediswriter.cpp | 11 +++++++++++ lib/redis/rediswriter.hpp | 1 + 2 files changed, 12 insertions(+) diff --git a/lib/redis/rediswriter.cpp b/lib/redis/rediswriter.cpp index 599120c52..32e16d8bd 100644 --- a/lib/redis/rediswriter.cpp +++ b/lib/redis/rediswriter.cpp @@ -33,6 +33,9 @@ void RedisWriter::Start(bool runtimeCreated) { ObjectImpl::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::Stop(runtimeRemoved); +} diff --git a/lib/redis/rediswriter.hpp b/lib/redis/rediswriter.hpp index 34d8839e8..44fe6b4ae 100644 --- a/lib/redis/rediswriter.hpp +++ b/lib/redis/rediswriter.hpp @@ -38,6 +38,7 @@ public: DECLARE_OBJECTNAME(RedisWriter); virtual void Start(bool runtimeCreated) override; + virtual void Stop(bool runtimeRemoved) override; private: void ConnectionThreadProc(void);