Results 1 to 1 of 1
  1. #1
    vaibhavborole is offline Member
    Join Date
    Apr 2009
    Rep Power

    Cool Log4j problem - Logs are rolling into the previous date file

    I am using log4j with tomcat 6.0 for a web application

    I have started my web application with multiple server mode, as I have 3 ulrs for the same web application

    I am using "org.apache.log4j.DailyRollingFileAppender" in log4j.xml to append the file and date patterns as "yyyy-MM-dd",
    but when the date of the server is changed the copy of the original file is created with the appeding a date at last of the file name and the
    orginal file is kept as it is .

    and if any one access the application the logs get genarated in the new file which is created with the date appended in the last of the file name.
    The logs should get generated in the orignal file, but it is not working.

    for ex:

    Today the date is 14th April logs are getting generated in LOGS_ORGINAL_FILE.log file and when the date gets changed on server
    a new file is created with name as LOGS_ORGINAL_FILE_2009_04_14.log and
    all the logs from LOGS_ORGINAL_FILE.log are present in LOGS_ORGINAL_FILE_2009_04_14.log

    after the date change if any body access the application all the logs get generated in LOGS_ORGINAL_FILE_2009_04_14.log which is in correct

    It should get generated in LOGS_ORGINAL_FILE.log
    Last edited by vaibhavborole; 04-27-2009 at 11:37 AM.

Similar Threads

  1. log4j problem.
    By dheerajsea123 in forum Advanced Java
    Replies: 1
    Last Post: 12-10-2008, 08:33 AM
  2. Replies: 0
    Last Post: 11-24-2008, 06:48 PM
  3. Log4j - setting up name of log file
    By Virkant Pawar in forum New To Java
    Replies: 3
    Last Post: 06-03-2008, 07:39 AM
  4. log4j property file in my application
    By Peter in forum Advanced Java
    Replies: 3
    Last Post: 06-14-2007, 03:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts