logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Durham <david.dur...@gmail.com>
Subject log4j xml configuration problem -- should be easy
Date Thu, 13 Oct 2005 13:06:04 GMT
I've tried using the following config with log4j-1.2.12.jar and
commons-logging 1.0.4 and commons-logging 1.0.5.  The only logger that
I can get anything out of is the root logger.  Configuration below,
usage will follow:  (Also, apologies for the formatting; eclipse still
does not have tab replacement, that I know of, for the text-editor)

<?xml version="1.0" encoding="UTF-8" ?>

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

	   <level value="debug"/>
	   <appender-ref ref="rollingFile"/>

	<logger name="com">
		<level value="debug"/>
		<appender-ref ref="rollingFile"/>

	<logger name="org">
		<level value="debug"/>
		<appender-ref ref="rollingFile"/>

    <appender name="rollingFile"
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{dd MMM yyyy
                        HH:mm:ss} %c %m%n"/>
	<param name="maxFileSize" value="100KB"/>
        <param name="file" value="/home/ddurham/meijer-store-dir.log"/>


JSP test usage:

<%@ page import="org.apache.commons.logging.*" %>
Log root = LogFactory.getLog("root");

Log org = LogFactory.getLog("org");

Log com = LogFactory.getLog("com");

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message