https://issues.apache.org/bugzilla/show_bug.cgi?id=42189

--- Comment #19 from Emmanuel Bourg <[email protected]> 2012-02-01 14:32:01 UTC 
---
Is there any updates on this topic? Is help needed? I have been using this
component for quite some time now, most notably as a mean to nicely format the
JUL messages in my test cases without touching the code. An official release in
the central Maven repository, either as an independent component or as part of
the core distribution, would be very welcome.

For the record here is how I use the bridge to format the log messages in my
tests, in the Maven POM I put this:

  <dependencies>
    <dependency>
      <groupId>org.apache.logging</groupId>
      <artifactId>apache-jul-log4j-bridge</artifactId>
      <version>1.0.0-SNAPSHOT</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.16</version>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
      <systemProperties>
        <property>
          <name>java.util.logging.manager</name>
          <value>org.apache.logging.julbridge.JULBridgeLogManager</value>
        </property>
        <property>
          <name>log4j.configuration</name>
          <value>log4j.properties</value>
        </property>
      </systemProperties>
    </configuration>
  </plugin>

  <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
      <execution>
        <phase>generate-test-sources</phase>
        <goals><goal>run</goal></goals>
        <configuration>
          <tasks>
            <mkdir dir="target/test-classes"/>
            <echo file="target/test-classes/log4j.properties">
# log4j configuration for test cases
log4j.rootLogger=INFO, console
log4j.logger.com.arianesoftware=INFO

log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%d{HH:mm:ss}] [%p] %x %m%n
            </echo>
          </tasks>
        </configuration>
      </execution>
    </executions>
  </plugin>

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to