Solved

getting error log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.

Posted on 2010-09-11
3
8,034 Views
Last Modified: 2012-05-10
hello,
I have set up my log4j properties file and i get these errors on the console.
it appears to be writing to the log file, but i would like to get rid of these warnings

log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.
log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.
log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.
log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.
log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.
log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.
log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.


this is the properties file:
----------------------------------------------------------------------------------------------------
log4j.rootCategory=INFO, S

log4j.logger.com.kwm.servlets.smsUserServlet=INFO,A
log4j.logger.com.kwm.servlets.smsPublicServlet=INFO,B
log4j.logger.com.kwm.servlets.signupSmsServlet=INFO,C
log4j.logger.com.kwm.servlets.smsListenerServlet=INFO,D
log4j.logger.com.kwm.servlets.smsAjaxUserServlet=INFO,G

log4j.logger.com.kwm.gateway.GateWayRunner=INFO,E
log4j.logger.com.kwm.utils.test.BurstSmsText=INFO,E
log4j.logger.com.kwm.cron.QueRunner=INFO,F

log4j.appender.S = org.apache.log4j.ConsoleAppender
log4j.appender.S.layout = org.apache.log4j.PatternLayout
log4j.appender.S.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n


log4j.appender.A = org.apache.log4j.RollingFileAppender
log4j.appender.A.MaxFileSize=100MB
log4j.appender.A.MaxBackupIndex=4
log4j.appender.A.File = J:/qrt/tmp/smsUserServlet.log
log4j.appender.A.Append = true
log4j.appender.A.datePattern = '.'yyy-MM-dd
log4j.appender.A.layout = org.apache.log4j.PatternLayout
log4j.appender.A.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n

log4j.appender.B = org.apache.log4j.RollingFileAppender
log4j.appender.B.MaxFileSize=100MB
log4j.appender.B.MaxBackupIndex=4
log4j.appender.B.File = J:/qrt/tmp/smsPublicServlet.log
log4j.appender.B.Append = true
log4j.appender.B.datePattern = '.'yyy-MM-dd
log4j.appender.B.layout = org.apache.log4j.PatternLayout
log4j.appender.B.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n

log4j.appender.C = org.apache.log4j.RollingFileAppender
log4j.appender.C.MaxFileSize=100MB
log4j.appender.C.MaxBackupIndex=4
log4j.appender.C.File = J:/qrt/tmp/signupSmsServlet.log
log4j.appender.C.Append = true
log4j.appender.C.datePattern = '.'yyy-MM-dd
log4j.appender.C.layout = org.apache.log4j.PatternLayout
log4j.appender.C.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n

log4j.appender.D = org.apache.log4j.RollingFileAppender
log4j.appender.D.MaxFileSize=100MB
log4j.appender.D.MaxBackupIndex=4
log4j.appender.D.File = J:/qrt/tmp/smsListenerServlet.log
log4j.appender.D.Append = true
log4j.appender.D.datePattern = '.'yyy-MM-dd
log4j.appender.D.layout = org.apache.log4j.PatternLayout
log4j.appender.D.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n

log4j.appender.E = org.apache.log4j.RollingFileAppender
log4j.appender.E.MaxFileSize=100MB
log4j.appender.E.MaxBackupIndex=4
log4j.appender.E.File = J:/qrt/tmp/GateWayRunner.log
log4j.appender.E.Append = true
log4j.appender.E.datePattern = '.'yyy-MM-dd
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n

log4j.appender.F = org.apache.log4j.RollingFileAppender
log4j.appender.F.MaxFileSize=100MB
log4j.appender.F.MaxBackupIndex=4
log4j.appender.F.File = J:/qrt/tmp/QueRunner.log
log4j.appender.F.Append = true
log4j.appender.F.datePattern = '.'yyy-MM-dd
log4j.appender.F.layout = org.apache.log4j.PatternLayout
log4j.appender.F.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n

log4j.appender.G = org.apache.log4j.RollingFileAppender
log4j.appender.G.MaxFileSize=100MB
log4j.appender.G.MaxBackupIndex=4
log4j.appender.G.File = J:/qrt/tmp/smsAjaxUserServlet.log
log4j.appender.G.Append = true
log4j.appender.G.datePattern = '.'yyy-MM-dd
log4j.appender.G.layout = org.apache.log4j.PatternLayout
log4j.appender.G.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n

0
Comment
Question by:paries
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
Comment Utility
> log4j.appender.C.datePattern = '.'yyy-MM-dd

get rid of all the lines setting datePattern
0
 
LVL 65

Expert Comment

by:rockiroads
Comment Utility
is datePattern part of RollingFileAppender or DailyRollingFileAppender ? It might be the latter.

If you do not use it then just comment it out or try using DailyRollingFileAppender
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
Comment Utility
log4j.rootCategory=INFO, S,A,B,C,D,E,F
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now