icinga2 icon indicating copy to clipboard operation
icinga2 copied to clipboard

Avoid traversing the queries when they're to be logged in debug mode only

Open yhabteab opened this issue 3 years ago • 0 comments

Describe the bug

There are some places where the queries are always being traversed, just to log them in debug mode. However, if it is intended to have this in debug log only, why would we have to always iterate through them? I think we can just check in advance whether we are even in debug mode, and then log them.

https://github.com/Icinga/icinga2/blob/3a8abdcc3b85a3be62a0805b465e5fac55ae0538/lib/icingadb/redisconnection.cpp#L141-L144

yhabteab avatar Aug 30 '22 07:08 yhabteab