Juan Hernandez has posted comments on this change.

Change subject: core: [logging] Add the host name to the logging context
......................................................................


Patch Set 2:

What I would suggest is the following, assuming that you would like to use 
slf4j:

1. Include the slf4j API dependency inside the POM:

  <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.2</version>
  </dependency>

(Version 1.7.2 is the one used by the application server.)

2. Modify your class to use the slf4j Logger, LoggerFactory, and MDC classes 
instead of our own logger. This should be simple, as slf4j provides the "{}" 
syntax as well (but without the numeric indexes), so you just have to replace 
"log.errorFormat("Whatever is {0}", whatever)" with "log.error("Whatever is 
{}", whatever).

3. Include the slf4j API dependency inside the MANIFEST.MF of the .ear 
(ear/src/main/resources/META-INF/MANIFEST.MF), just add a line with this:

  org.slf4j

(This is the name of the JBoss module containing the slf4j API.)

4. Use the %X syntax as you are already doing, as it does work correctly when 
using slf4j, at least in my tests.

-- 
To view, visit http://gerrit.ovirt.org/16548
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iafad27da56400741974132c956f90ba937c20a98
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to