df95edb Issue 49835 - lib389: fix logging

12 files Authored by stlaz 7 months ago , Committed by Simon Pichugin 7 months ago ,
    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.
    Reviewed by: mreynolds, spichugi
    Signed-off-by: Simon Pichugin <simon.pichugin@gmail.com>
file modified
+109 -108
file modified
+15 -15
file modified
+14 -14
file modified
+1 -1
file modified
+31 -31
file modified
+34 -33
file modified
+71 -75