Return-Path: Delivered-To: apmail-logging-log4net-dev-archive@www.apache.org Received: (qmail 28241 invoked from network); 2 May 2005 21:30:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 May 2005 21:30:38 -0000 Received: (qmail 66284 invoked by uid 500); 2 May 2005 21:31:57 -0000 Delivered-To: apmail-logging-log4net-dev-archive@logging.apache.org Received: (qmail 66248 invoked by uid 500); 2 May 2005 21:31:57 -0000 Mailing-List: contact log4net-dev-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET Dev" Delivered-To: mailing list log4net-dev@logging.apache.org Received: (qmail 66185 invoked by uid 500); 2 May 2005 21:31:56 -0000 Delivered-To: apmail-logging-log4net-cvs@apache.org Received: (qmail 66148 invoked by uid 99); 2 May 2005 21:31:55 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 02 May 2005 14:31:55 -0700 Received: (qmail 28141 invoked by uid 1808); 2 May 2005 21:30:22 -0000 Date: 2 May 2005 21:30:22 -0000 Message-ID: <20050502213022.28140.qmail@minotaur.apache.org> From: nicko@apache.org To: logging-log4net-cvs@apache.org Subject: cvs commit: logging-log4net/xdocs/src/release faq.xml X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N nicko 2005/05/02 14:30:22 Modified: xdocs/src/release faq.xml Log: Updated FAQ to include information on FileAppender MinimalLock model Revision Changes Path 1.5 +20 -12 logging-log4net/xdocs/src/release/faq.xml Index: faq.xml =================================================================== RCS file: /home/cvs/logging-log4net/xdocs/src/release/faq.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- faq.xml 2 May 2005 21:12:42 -0000 1.4 +++ faq.xml 2 May 2005 21:30:22 -0000 1.5 @@ -620,29 +620,37 @@

- The FileAppender holds a write lock on the log - file while it is logging. This prevents other processes from writing to the - file, therefore it is not possible to have multiple processes log directly - to the same log file, even if they are on the same machine. -

-

- You may have each process log to a RemotingAppender. - The receiving RemoteLoggingServerPlugin (or - IRemoteLoggingSink) can receive all the events and - send them to a single log file. + By default the FileAppender holds an exclusive write + lock on the log file while it is logging. This prevents other processes from + writing to the file. The FileAppender can be configured + to use a different locking model, MinimalLock, that + only acquires the write lock while a log is being written. This allows multiple + processes to interleave writes to the same file, albeit with a loss in performance. + See the FileAppender config examples + for an example MinimalLock configuration. +

+

+ While the MinimalLock model may be used to interleave + writes to a single file it may not be the optimal solution, especially when + logging from multiple machines. Alternatively you may have one or more processes + log to RemotingAppenders. + Using the RemoteLoggingServerPlugin (or + IRemoteLoggingSink) a process can receive all the events and + log them to a single log file.

Back to Top

-
+

The timestamp is created when the logging event is created. That is so say, when the Debug, Info, Warn, Error or Fatal method is invoked. This is unaffected by the time at which they may arrive at a remote server. Since the timestamps are - stored in UTC format inside the event, they all appear in the same time zone as + transmitted in UTC format by the RemotingAppender, + they all appear in the same time zone as the host creating the logfile. Since the clocks of various machines may not be synchronized, this may account for time interval inconsistencies between events generated on different hosts.