Solved

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

Posted on 2010-09-11
3
9,412 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 92

Accepted Solution

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

get rid of all the lines setting datePattern
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33655827
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
ID: 33655897
log4j.rootCategory=INFO, S,A,B,C,D,E,F
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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 will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This video teaches viewers about errors in exception handling.

729 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