We help IT Professionals succeed at work.

Server logs are generated automatically by appending current date

TheMajestic
TheMajestic asked
on
hi,

i have log files in my application , but what happens is the new log file is getting generated by appending date at the back . can i know why this is happening .

thnx in advance
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2007

Commented:
What application is this?

If you have a configuration file for this application you look at something like log rotation or logging file name, etc.

Author

Commented:
this is the script i wrote ,

log4j.logger.com.matrixone.ps.tomcat=debug, R
log4j.additivity.com.matrixone.ps.tomcat=false
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=/apps/WebSphere/pdmprod/AppServer/logs/ActionServletLogs/ExtendedRequestLog.log
log4j.appender.R.DatePattern='.'yyyy-MM-dd
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d{ISO8601}\t%p\t%m\n


is this because of the "org.apache.log4j.DailyRollingFileAppender" it is appending the date with the file??

Author

Commented:
the problem now is the files are generating but ,

The data is appending both in ExtendedRequestLog.log and also in ExtendedRequestLog.log_<yesterday_data>.

Why this happenes ???

CERTIFIED EXPERT
Top Expert 2007

Commented:
KWhat the line below is doing?

log4j.appender.R.DatePattern='.'yyyy-MM-dd

Author

Commented:
That gives the date pattern which should be added to the file .

but the problem now is :  lets sat boo.log is changed to boo_<date>.log at midnight 12.
but still the logs are going in boo_<date>.log and also in boo.log

the another thing is boo.log contains one part of the log and boo_<date>.log contains another part.
I found the solution , this happenes because of the Zombie process.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.