logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SMITH, CURTIS" <cs0...@att.com>
Subject Not getting my log output, need debugging v2 tips?
Date Tue, 23 Jul 2013 21:37:12 GMT
I feel apologetic for asking how to debug a v2 configuration but there's no links off the v2
website.  My env is embedded and I'm not getting any missing classpath problems, I solved
those.  I am getting console output but none of my FastRollingFile appenders are emitting
their logs.

Some of my problem may have been translating my v1 log4j.properties into the v2 equivalent.

Maybe I need to create a logger for the log4j packages to the console appender?  I attempted
that.  See highlighted logger:

log4j.logger.com.att.dlc.afm=DEBUG,DEVICES,ERRORLOG
log4j.additivity.com.att.dlc.afm=false

log4j.logger.com.att.dlc.devices=DEBUG,DEVICES,ERRORLOG
log4j.additivity.com.att.dlc.devices=false

log4j.logger.com.att.dlc.util.serialport=DEBUG,DEVICES,ERRORLOG
log4j.additivity.com.att.dlc.util.serialport=false

log4j.logger.com.att.dlc.webcamserver=DEBUG,VIDEO,ERRORLOG
log4j.additivity.com.att.dlc.webcamserver=false

log4j.logger.com.att.dlc.devices.cameras=DEBUG,VIDEO,ERRORLOG
log4j.additivity.com.att.dlc.devices.cameras=false


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
        <appenders>
                <FastRollingFile name="DLA" fileName="/tmp/att/sync/log/dla.log"
                        filePattern="/tmp/att/sync/log/dla.log.$i" append="true">
                        <PatternLayout>
                                <pattern>[%d][%-5p][%-15t][%-15c{1}]:%m%n</pattern>
                        </PatternLayout>
                        <Policies>
                                <SizedBasedTriggeringPolicy size="3 MB" />
                        </Policies>
                        <DefaultRolloverStrategy max="2" />
                </FastRollingFile>
                <FastRollingFile name="DEVICES"
                        fileName="/tmp/att/sync/log/dla_devices.log" filePattern="/tmp/att/sync/log/dla_devices.log.$i"
                        append="true">
                        <PatternLayout>
                                <pattern>[%d][%-5p][%-15t][%-15c{1}]:%m%n</pattern>
                        </PatternLayout>
                        <Policies>
                                <SizedBasedTriggeringPolicy size="3 MB" />
                        </Policies>
                        <DefaultRolloverStrategy max="1" />
                </FastRollingFile>
                <FastRollingFile name="VIDEO"
                        fileName="/tmp/att/sync/log/dla_video.log" filePattern="/tmp/att/sync/log/dla_video.log.$i"
                        append="true">
                        <PatternLayout>
                                <pattern>[%d][%-5p][%-15t][%-15c{1}]:%m%n</pattern>
                        </PatternLayout>
                        <Policies>
                                <SizedBasedTriggeringPolicy size="3 MB" />
                        </Policies>
                        <DefaultRolloverStrategy max="1" />
                </FastRollingFile>
                <Console name="CO" target="SYSTEM_OUT">
                        <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n" />
                </Console>
        </appenders>
        <loggers>
                <logger name="org.apache" level="debug">
                        <appender-ref ref="CO" />
                </logger>
                <logger name="com.att.dlc.afm" additivity="false" level="debug">
                        <appender-ref ref="DLA" />
                </logger>
                <logger name="com.att.dlc.devices" additivity="false" level="debug">
                        <appender-ref ref="DEVICES" />
                </logger>
                <logger name="com.att.dlc.util.serialport" additivity="false" level="debug">
                        <appender-ref ref="DEVICES" />
                </logger>
                <logger name="com.att.dlc.webcamserver" additivity="false" level="debug">
                        <appender-ref ref="VIDEO" />
                </logger>
                <logger name="com.att.dlc.devices.cameras" additivity="false" level="debug">
                        <appender-ref ref="VIDEO" />
                </logger>
                <root level="debug">
                        <appender-ref ref="DLA" />
                </root>
        </loggers>
</configuration>

Curt Smith
AT&T Digital Life
DLC Software Development
404-499-7013
(cell) 678-365-6508




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message