https://issues.apache.org/bugzilla/show_bug.cgi?id=48704

           Summary: Multiple Java Process in Cluster Logging to the same
                    log file and rotating the same log file
           Product: Log4j
           Version: 1.2
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Keywords: APIBug
          Severity: normal
          Priority: P2
         Component: Appender
        AssignedTo: [email protected]
        ReportedBy: [email protected]


This may already be a known issue.
When multiple java process log to the same log file and rotate the same log
file the process that gets to rotate the file first gets the change to write to
the new and most current log file and all other java processes continue to log
to the renamed, rotated file.

Scenario relevance : this probably should happen in any clustered environtment
where cluster members log to the same log file.

The issue seems to be happenning because the file writers in the other java
processes are still pointing to the old file that was renamed by the other java
process in a cluster.

So if there is an additional rollOver method, in the current RollOver classes,
that is cluster aware that checks the file writers in the appenders and
refreshes them before writing to a log file and also after rolling them over it
would be a great help to clustered environtments.

Otherwise developers may have to extend the appenders and add this
functionality and may have to update code everytime when Apache does a new
log4j release.

I have attached one such sample zip file with changed src code for reference.

Or if there is some other solution to this problem can someone pls update the
online documentation. Thanks !

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to