logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbowditch <bowditch_ch...@hotmail.com>
Subject 0-byte log file created when using IBM JDK
Date Mon, 07 Sep 2009 10:12:46 GMT

Hi All,

I have an application that uses log4j debugging and the log files are
created perfectly when using Sun JDK 5. However, my customer has IBM JDK 5
and when I enable log4J debugging the log file is created but is 0 bytes.
The exact same log4J configuration file is used on Sun and IBM JDKs

My Java application uses PropertyConfigurator.configure to configure log4J,
but log4J finds a log4j.properties file somewhere in the classpath. I
spotted this by turning on log4J debugging using -Dlog4j.debug=true.
However, specifying the path using -Dlog4J.configuration doesn't help and
log4J is still initialized twice due to the call to
PropertyConfigurator.configure. The output from log4 debug is shown below. I
suspect that IBM JDK intercepts log4J messages as you can configure logging
from within Websphere. Although my application runs standalone and is not a
web application. Does anyone know why the messages don't make it to the log
file?

log4j: Using URL
[file:/C:/Thunderhead40/servers/thserverWAS/config/JLBProtocolD
ebug.cfg] for automatic log4j configuration.
log4j: Reading configuration from URL
file:/C:/Thunderhead40/servers/thserverWAS
/config/JLBProtocolDebug.cfg
log4j: Parsing for [root] with value=[warn,file].
log4j: Level token is [warn].
log4j: Category root set to WARN
log4j: Parsing appender named "file".
log4j: Parsing layout options for "file".
log4j: Setting property [conversionPattern] to [%r [%p] %C{1}.%M(): - %m%n].
log4j: End of parsing for "file".
log4j: Setting property [file] to
[c:\thunderhead40\servers\thserverWAS\bin\JLBP
rotocolDebug.log].
log4j: Setting property [maxBackupIndex] to [1].
log4j: Setting property [threshold] to [DEBUG].
log4j: Setting property [maxFileSize] to [1000KB].
log4j: setFile called:
c:\thunderhead40\servers\thserverWAS\bin\JLBProtocolDebug
.log, true
log4j: setFile ended
log4j: Parsed "file" options.
log4j: Parsing for [org.jgroups] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category org.jgroups set to DEBUG
log4j: Handling log4j.additivity.org.jgroups=[null]
log4j: Finished configuring.
log4j: Parsing for [root] with value=[warn,file].
log4j: Level token is [warn].
log4j: Category root set to WARN
log4j: Parsing appender named "file".
log4j: Parsing layout options for "file".
log4j: Setting property [conversionPattern] to [%r [%p] %C{1}.%M(): - %m%n].
log4j: End of parsing for "file".
log4j: Setting property [file] to
[c:\thunderhead40\servers\thserverWAS\bin\JLBP
rotocolDebug.log].
log4j: Setting property [maxBackupIndex] to [1].
log4j: Setting property [threshold] to [DEBUG].
log4j: Setting property [maxFileSize] to [1000KB].
log4j: setFile called:
c:\thunderhead40\servers\thserverWAS\bin\JLBProtocolDebug
.log, true
log4j: setFile ended
log4j: Parsed "file" options.
log4j: Parsing for [org.jgroups] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category org.jgroups set to DEBUG
log4j: Handling log4j.additivity.org.jgroups=[null]
log4j: Finished configuring.
-- 
View this message in context: http://www.nabble.com/0-byte-log-file-created-when-using-IBM-JDK-tp25328152p25328152.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


Mime
View raw message