You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Andy Kriger <ak...@triene.com> on 2001/01/30 03:46:32 UTC

Append problem

I am trying to setup a log4j.properties file with log4j.appender
Append=false so that the file is overwritten every time. However, nothing is
logged to the file.

Here is my log4j.properties...
log4j.category.com.triene=DEBUG,logfile

log4j.appender.logfile=org.apache.log4j.FileAppender
log4j.appender.logfile.File=triene.log
log4j.appender.logfile.Append=false
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %c [%t] %-5p %x - %m%n

Here is the output to the file as the logging occurs...
C:\dev\weblogic>tail -f triene.log
2001-01-29 21:38:21,876 com.triene.data.proxy.CalculatorProxy
[StartupThread] DEBUG  - this is a test
2001-01-29 21:38:21,876 com.triene.data.proxy.CalculatorProxy
[StartupThread] INFO   - this is a test
2001-01-29 21:38:21,926 com.triene.data.proxy.FameProxy [StartupThread]
DEBUG  - this is a test
2001-01-29 21:38:21,926 com.triene.data.proxy.FameProxy [StartupThread] INFO
- this is a test
==> triene.log: file truncated <==

It's the "file truncated" bit that is causing the problem and I don't
understand why it's happening.\

Any help would be appreciated as I am puzzled.

thx

Andy Kriger
Triene Inc.
116 W23rd Street
Suite 500
New York, NY 10011
646.375.2364 (W)
646.298.5493 (M)