2

I'm facing this issue for quite some time now. I have an EAR deployed in IBM WAS version 7. My application is spring based and it is not logging any spring related info in the console or in the log file.

I have verified the following,

  1. log4j.properties is injected as a bean. A log file is getting created as mentioned in the properties file and it logs only the java logging statements not even a single spring log.
  2. I have packaged log4j-1.2.14.jar with the application. I have included commons-logging.jar and commons-logging-api.jar along with it (The same issue without the commons jars)
  3. We are using ANT as our build tool.

Can anyone guide me where Iam going wrong?

Here is my log4j.properties file:

log4j.rootLogger=ALL, console, File

Console Appender

log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.layout=org.apache.log4j.PatternLayout log4j.appender.console.layout.ConversionPattern=[%5p] [%t %d{hh:mm:ss}] %X{traceID}-(%F:%M:%L) %m%n

Rolling File Appender

log4j.appender.File=org.apache.log4j.RollingFileAppender log4j.appender.File.maxFileSize=10000KB log4j.appender.File.maxBackupIndex=20 log4j.appender.File.File=C:\logs\new\app.log log4j.appender.File.layout=org.apache.log4j.PatternLayout log4j.appender.File.layout.ConversionPattern=%d{ISO8601} | %-5p | %c | %X{traceID} | %t | %m%n log4j.appender.File.ImmediateFlush=true log4j.appender.File.Append=true

Custom assignments

log4j.logger.endpoint=DEBUG,console,File log4j.logger.controller=DEBUG,console,File log4j.logger.handler=DEBUG,console,File

Disable additivity

log4j.additivity.endpoint=false log4j.additivity.controller=false log4j.additivity.handler=false log4j.additivity.dao=false log4j.additivity.loggingInterceptor=false

log4j.additivity.org.springframework=false

4

0 に答える 0