From 955b6127034f5aa1944032ddfe64d7caec9c87d0 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 17 Dec 2019 11:49:54 +0100 Subject: [PATCH] RedisConnection: shorten log messages --- lib/icingadb/redisconnection.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/icingadb/redisconnection.cpp b/lib/icingadb/redisconnection.cpp index bd94273d9..d1e4474e3 100644 --- a/lib/icingadb/redisconnection.cpp +++ b/lib/icingadb/redisconnection.cpp @@ -64,7 +64,11 @@ void LogQuery(RedisConnection::Query& query, Log& msg) break; } - msg << " '" << arg << '\''; + if (arg.GetLength() > 64) { + msg << " '" << arg.SubStr(0, 61) << "...'"; + } else { + msg << " '" << arg << '\''; + } } }