status=trace on the configuration element will enable debugging of the internal
components. It uses the StatusLogger, which is essentially just a special
Logger. You can add a listener to it do do what you want with the events. A
StatusConsoleListener is provided and is enabled by default when you enable
debug, trace, etc. You can also specify the dest attribute which will allow
you to route the output to a file.
Ralph
On Jul 23, 2013, at 2:37 PM, SMITH, CURTIS wrote:
> 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
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]