Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Facing log4j:WARN Failed to set property [maxFileSize] after upgrade

Status
Not open for further replies.

kannan4let

Programmer
Sep 17, 2009
4
IN
Hi,

I have upgraded the log4j version 1.1.x to log4j 1.2.x. After upgrade faced the following issue.

log4j: Setting property [maxFileSize] to [1000KB]. log4j:WARN Failed to set property [maxFileSize] to value "1000KB". java.lang.IllegalArgumentException: object is not an instance of declaring class ....
log4j: Setting property [maxBackupIndex] to [6]. log4j:WARN Failed to set property [maxBackupIndex] to value "6". java.lang.IllegalArgumentException: object is not an instance of declaring class ....
log4j: Setting property [file] to [C:/PROGRA~1/log/sa.log]. log4j:WARN Failed to set property [file] to value "C:/PROGRA~1/log/sa.log". java.lang.IllegalArgumentException: object is not an instance of declaring class

I have used RollingFileAppender class and tried to changing to some other appender call. Still facing the same issue.

log4j.properties file content:

log4j.category.com.cisco.nm.cmf.util.MailUtility=INFO, SA log4j.category.com.cisco.nm.cmf.util.Util=INFO, SA log4j.additivity.com.cisco.nm.cmf.util.MailUtility=false log4j.additivity.com.cisco.nm.cmf.util.Util=false log4j.appender.SA=org.apache.log4j.RollingFileAppender log4j.appender.SA.MaxFileSize=1000KB log4j.appender.SA.MaxBackupIndex=6 log4j.appender.SA.layout=org.apache.log4j.PatternLayout log4j.appender.SA.layout.ConversionPattern=[ %d{EEE MMM dd HH:mm:ss z yyyy} ] %-5p [%C{1} : %M] %x : %m\r\n log4j.appender.SA.File=C:/PROGRA~1/log/sa.log


Thanks in Advance,

Thanks,
Kannan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top