Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

You can also configure log4j in an xml format.  This is required if you want to use some of the new features from apache-log4j-extra, such as the TimeBasedRollingPolicy, which rolls your files at midnight and gzips them!

...

Modify the web.xml file in the same directory and change log4j.properties to log4j.xml:

Code Block
    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>/WEB-INF/log4j.xml</param-value>
    </context-param>

...

Add a version line in the appropriate spot:

Code Block

<log4j.extras.version>1.0</log4j.extras.version>

Further down add a dependency section bellow the main log4j one:

Code Block
<dependency>
	<groupId>log4j</groupId>
    	<artifactId>apache-log4j-extras</artifactId>
    	<version>${log4j.extras.version}</version>
</dependency> 

Now edit uportal-war/pom.xml

...

Code Block
<!-- ===== Runtime Time Dependencies ============================== -->
<dependency>
	<groupId>log4j</groupId>
	<artifactId>apache-log4j-extras</artifactId>
	<scope>runtime</scope>
/dependency>