Solved

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

Posted on 2010-09-11
3
8,817 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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 the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

856 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