Hi..
I have created an application which is using the org.apache.log4j.Logger class for logging various INFO/DEBUG?ERROR messages..
The application is working fine, including logging, when Run As Java Application in the Eclipse IDE..(log file is generated successfully and entries too are created)
Then I exported the project to a .jar file.
On running the jar file from the command prompt as :
C:\decNew>java -jar Decrypt.jar OutputFile.txt DecryptFile.txt
,the application is working fine but the log file is not generated...I am getting the following message on the command prompt :
log4j:WARN No appenders could be found for logger(com.decSrc.DecEntryClass).
log4j:WARN Please initialize the log4j system properly.
Manifest file contents:
Manifest-Version: 1.0
Main-Class: com.decSrc.DecEntryClass
Class-Path: log4j.jar
log4j.properties
log4j.rootCategory=DEBUG, R, O
# Stdout
log4j.appender.O=org.apache.log4j.ConsoleAppender
# File
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:\logs\log4j.log
# Control the maximum log file size
log4j.appender.R.MaxFileSize=100KB
# Archive log files (one backup file here)
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.O.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=[%d{ISO8601}]%5p%6.6r[%t]%x - %C.%M(%F:%L) - %m%n
log4j.appender.O.layout.ConversionPattern=[%d{ISO8601}]%5p%6.6r[%t]%x - %C.%M(%F:%L) - %m%n
Any suggestions?