[
http://jira.codehaus.org/browse/MTOMCAT-53?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Olivier Lamy closed MTOMCAT-53.
-------------------------------
Resolution: Duplicate
Fix Version/s: 1.0
Assignee: Olivier Lamy
> System Properties set too late for logging alteration
> -----------------------------------------------------
>
> Key: MTOMCAT-53
> URL: http://jira.codehaus.org/browse/MTOMCAT-53
> Project: Maven 2.x Tomcat Plugin
> Issue Type: Bug
> Affects Versions: 1.0-beta-1
> Environment: any
> Reporter: Hasan Ceylan
> Assignee: Olivier Lamy
> Priority: Trivial
> Fix For: 1.0
>
> Attachments: patch.patch
>
>
> As I hate the juli logging that tomcat developers insist on using, I replace
> the logger to log4j as per tomcat documentation as soon as I install new one.
> But maven tomcat plugin uses embedded tomcat which still makes it possible to
> force log4j over juli. Except a change is needed in the source.
> According to the discussion here [1] System.properties should be set as soon
> as possible preferable before loading any tomcat class to prevent being too
> late for logger initialization. Therefore the attached patch is needed which
> merely move setupSystemProperties up before any tomcat class construction.
> Also a tweak in the plugin configuration is needed as below:
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>tomcat-maven-plugin</artifactId>
> <configuration>
> <path>/</path>
> <systemProperties>
> <java.util.logging.manager>org.apache.juli.ClassLoaderLogManager</java.util.logging.manager>
> <log4j.configuration>file://${basedir}/src/main/webapp/WEB-INF/log4j.xml</log4j.configuration>
> </systemProperties>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.apache.tomcat</groupId>
> <artifactId>juli</artifactId>
> <classifier>log4j</classifier>
> <version>6.0.26</version>
> </dependency>
> <dependency>
> <groupId>org.apache.tomcat</groupId>
> <artifactId>juli-adapters</artifactId>
> <version>6.0.26</version>
> </dependency>
> <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.13</version>
> </dependency>
> </dependencies>
> </plugin>
> regards,
> Hasan Ceylan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email