I created a log4j.xml and run the build, I can see the log file was created, but it cannot log anything inside
E:\Interwoven\TeamSite\local\config\lib\content_center\livesite_customer_src\log4j.xml
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
< log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
< !-- Define Appenders here -->
< appender name="customer" class="org.apache.log4j.RollingFileAppender">
< param name="File" value="${iw.client.log.path}/custom.log"/>
< param name="MaxFileSize" value="100MB"/>
< param name="MaxBackupIndex" value="10"/>
< layout class="org.apache.log4j.PatternLayout">
< param name="ConversionPattern" value="%d [%t] %-5p %c (%x) - %m%n"/>
< /layout>
< /appender>
< !-- Define Loggers here -->
< !--
All logs from customized codes will be in IWHOME/local/logs/iwui/custom.log if "CUSTOM"
appender-ref gets used.
-->
< logger name="com.test.livesite.component.external" additivity="true">
< level value="warn"/>
< appender-ref ref="customer"/>
< /logger>
< /log4j:configuration>
Java code
package com.test.livesite.component.external;
...
public class Test {
private static final Log LOGGER = LogFactory.getLog(Test.class);
public Document handleRequest(RequestContext context)
{
LOGGER.error("Test::handleRequest");
...