logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <rem...@yahoo.com>
Subject Re: Not getting my log output, need debugging v2 tips?
Date Tue, 23 Jul 2013 22:04:16 GMT
You did switch on AsyncLoggers using the context selector?
One reason you may not see FastFile output is if the buffer is not being flushed.
AsyncLoggers auto-flush so this should not happen but since you're not seeing output...

Several things to try: 
* in the FastRollingFile appender config, try setting immediateFlush="true", just to see if
you now get output
* change your configuration element to add level=TRACE: <configuration level="trace" >
and see if the AsyncLoggers are being started correctly.
  you should see "Starting AsyncLogger disruptor with ringbuffer size {}..."

Remko


________________________________
 From: "SMITH, CURTIS" <cs0428@att.com>
To: "log4j-user@logging.apache.org" <log4j-user@logging.apache.org> 
Sent: Wednesday, July 24, 2013 6:37 AM
Subject: Not getting my log output, need debugging v2 tips?
 

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