From commits-return-162-apmail-logging-commits-archive=logging.apache.org@logging.apache.org Tue Oct 4 15:31:15 2011 Return-Path: X-Original-To: apmail-logging-commits-archive@minotaur.apache.org Delivered-To: apmail-logging-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 92A957D38 for ; Tue, 4 Oct 2011 15:31:15 +0000 (UTC) Received: (qmail 35802 invoked by uid 500); 4 Oct 2011 15:31:15 -0000 Delivered-To: apmail-logging-commits-archive@logging.apache.org Received: (qmail 35782 invoked by uid 500); 4 Oct 2011 15:31:15 -0000 Mailing-List: contact commits-help@logging.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@logging.apache.org Delivered-To: mailing list commits@logging.apache.org Received: (qmail 35775 invoked by uid 99); 4 Oct 2011 15:31:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 15:31:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 15:31:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2A41423888CD; Tue, 4 Oct 2011 15:30:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1178832 - /logging/log4net/trunk/src/site/xdoc/release/faq.xml Date: Tue, 04 Oct 2011 15:30:51 -0000 To: commits@logging.apache.org From: bodewig@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111004153052.2A41423888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bodewig Date: Tue Oct 4 15:30:51 2011 New Revision: 1178832 URL: http://svn.apache.org/viewvc?rev=1178832&view=rev Log: Log as early as possible. LOG4NET-274 Modified: logging/log4net/trunk/src/site/xdoc/release/faq.xml Modified: logging/log4net/trunk/src/site/xdoc/release/faq.xml URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/site/xdoc/release/faq.xml?rev=1178832&r1=1178831&r2=1178832&view=diff ============================================================================== --- logging/log4net/trunk/src/site/xdoc/release/faq.xml (original) +++ logging/log4net/trunk/src/site/xdoc/release/faq.xml Tue Oct 4 15:30:51 2011 @@ -25,6 +25,8 @@ limitations under the License. + +
@@ -1014,6 +1016,35 @@ public class FastLogger

Back to Top

+
+

+ If you use attributes to configure log4net then + the order by which assemblies are loaded may + determine whether you attributes are used or + not. Assembly load order may be different in + DEBUG and RELEASE mode. +

+ +

+ As stated in the + manual the attribute will only be read for + the first assembly that tries to use log4net. + So it is important that you obtain your + ILog instance as early as possible. +

+ +

+ For a command line application "as early as + possible" probably is the class holding the + Main method, for a Web-Application + it would be your Global.asax class + and for a Windows Service it would be the class + deriving from ServiceBase. +

+
+

Back to Top