Issue 49835 - lib389: fix logging
The python standard logging module allows to postpone the string
interpolation in logs till the time the interpolation is actually
needed (note that you may be running in a certain logging level
that won't need to display/write all strings). This behavior is
there to comply with the logging requirement so that logs don't
affect the performance if no logging happens.
The above behavior only works when strings are passed as arguments
to the logging methods. If the interpolation is invoked at place
either by using the `%` notation or by using the `str.format()`
method, python logging can't perform its performance heuristics
since the strings get interpolated before they are handed to the
logging methods.
This commit fixes the improper behavior observed in the lib389
library, plus adds some fixes to improper invokes of the logging
methods - multiple arguments if formatting string does not contain
formatting variables - which would cause internal logging errors
that don't cause the scripts failures, which is why they probably
weren't reported yet.
https://pagure.io/389-ds-base/issue/49835
Reviewed by: mreynolds, spichugi
Signed-off-by: Simon Pichugin <simon.pichugin@gmail.com>