icinga2
icinga2 copied to clipboard
Avoid traversing the queries when they're to be logged in debug mode only
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