[ovirt-devel] [ATN] Migration to slf4j finished

Martin Perina mperina at redhat.com
Mon Oct 27 14:58:27 UTC 2014


Hi,

patch which removes oVirt logger was just merged. So in all
your current and future patches for oVirt engine please use
only slf4j as logging framework.

Alon already posted some slf4j guidelines [1].

During logging refactoring we also started to quote parameter
values in logging messages. Here are current "rules" for
quoting:

 1. Quote parameter values ONLY using single quote character

 2. Quote non number attribute values

 3. Don't quote primitive type numbers

 4. Don't quote error messages, because they are the last part
    of message string after ':', so there's no need to quote

 5. Don't quote strings which creates sentence of log message,
    for example

        log.info("Feature was {}", enabled ? "enabled" : "disabled");

 6. For the rest of cases use common sense :)


Please feel free to write any comments to the quote guidelines.
For example we may decide to alter "rule" 2. to not quote value
which cannot be null or empty.

Once agreed we could add those into some engine Java code
convention guide :)


Thanks

Martin Perina


[1] http://lists.ovirt.org/pipermail/devel/2014-October/009028.html



More information about the Devel mailing list