Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Rep Power

    Question log4j log files are not getting rolled over

    log4j logfiles are not getting rolled over
    We have an application which uses log4j to log its log messages, we are using rolling file appender and the roll over size is 5MB.
    Every thing runs fine when we have only one instance of this application running. The file gets rolled over after crossing 5MB.
    We are facing a problem only when we start the same application two times (in two different JVMS). The log file does not get roll over even after crossing 5MB.

    We have this problem as two log 4j instances ( running in different JVMS) are accessing the same file in parallel. The case might be that log 4j has a file pointer which is not refreshed when another instance of log 4j (running in different JVM) updates the same file.
    Is there any way to refresh the PropertyConfigurator setting.

  2. #2
    raj@hcl is offline Member
    Join Date
    Dec 2010
    Rep Power


    I m using RollingfileAppender to split log file, but log is getting rewritten to same file when it reached specifyed size in log4j.properites. I want log file get splited after certain size. plz suggest solution to it.

    Here is my file
    log4j.rootCategory=WARN, A1
    log4j.appender.A1=org.apache.log4j.RollingFileAppe nder

    log4j.appender.A1.layout=org.apache.log4j.PatternL ayout
    log4j.appender.A1.layout.ConversionPattern=%d{ISO8 601} [%t] %-5p %c %l - %m%n

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power


    Bad enough that the original double post went undetected. raj@hcl, Please stop resurrecting old threads.


Similar Threads

  1. log4j log files are not getting rolled over
    By ajaykumar_mohini in forum New To Java
    Replies: 12
    Last Post: 12-08-2010, 11:26 AM
  2. log4j
    By swapna_d in forum New To Java
    Replies: 7
    Last Post: 08-04-2010, 12:23 AM
  3. Regarding Log4j
    By sidiq in forum New To Java
    Replies: 0
    Last Post: 04-07-2008, 07:35 PM
  4. Log4j
    By chakri in forum New To Java
    Replies: 1
    Last Post: 02-08-2008, 11:15 PM
  5. log4j initialization
    By arfatkhan in forum Web Frameworks
    Replies: 3
    Last Post: 08-10-2007, 07:42 PM

Posting Permissions

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