Return-Path: X-Original-To: apmail-logging-log4net-user-archive@www.apache.org Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 01310C99A for ; Thu, 26 Apr 2012 23:01:16 +0000 (UTC) Received: (qmail 8184 invoked by uid 500); 26 Apr 2012 23:01:15 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 8129 invoked by uid 500); 26 Apr 2012 23:01:15 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 8120 invoked by uid 99); 26 Apr 2012 23:01:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 23:01:14 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [206.132.232.3] (HELO smtp.datasci.com) (206.132.232.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 23:01:08 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CD2400.6AFA3B63" Subject: Duplicate log entries with DLL/EXE combination Date: Thu, 26 Apr 2012 18:01:39 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Duplicate log entries with DLL/EXE combination Thread-Index: Ac0kAALB4y8TVlctRHCb5rlPwPxIIw== From: "Kramer, Mat" To: X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01CD2400.6AFA3B63 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, =20 We have a .NET executable and a DLL assembly that both use log4net. One of the complications is that the DLL is also called from an unmanaged C++ application and we want logging to work in that setting. Our current solution works, but I get many duplicate log entries when I am running the .NET EXE with the .NET DLL. The configurations are below. Any ideas for how to fix this? I have to admit I don't really understand how it works now. =20 Thanks! =20 Application configuration =20 =20 =20 =20 =20 DLL configuration =20 =20 =20 =20 =20 =20 =20 =20 -Mat =20 ------_=_NextPart_001_01CD2400.6AFA3B63 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

We have a = .NET executable and a DLL assembly that both use log4net.  One of = the complications is that the DLL is also called from an unmanaged C++ = application and we want logging to work in that setting.  Our = current solution works, but I get many duplicate log entries when I am = running the .NET EXE with the .NET DLL.  The configurations are = below.  Any ideas for how to fix this?  I have to admit I = don’t really understand how it works now.

 

Thanks!

 

Application configuration

 

<log4net>

 

  = <appender name=3D"DebugAppender" = type=3D"log4net.Appender.RollingFileAppender">

    <file = value=3D"log-file-fauxnemah.txt" />

    <appendToFile = value=3D"true" />

    <rollingStyle = value=3D"Size" />

    <maxSizeRollBackups = value=3D"10" />

    <maximumFileSize = value=3D"50MB" />

    <staticLogFileName = value=3D"true" />

    <lockingModel = type=3D"log4net.Appender.FileAppender+MinimalLock" = />

    <layout = type=3D"log4net.Layout.PatternLayout">

=

      = <conversionPattern value=3D"%date %7level [%2thread] = %message%newline" />

    = </layout>

  = </appender>

 

  = <root>

    <level = value=3D"ALL" />

    <appender-ref = ref=3D"DebugAppender" />

  = </root>

 

</log4net>

 

DLL = configuration

 

<log4net>

 

  = <appender name=3D"DebugAppender" = type=3D"log4net.Appender.RollingFileAppender">

    <file = value=3D"TruSense//log-file-trusenseP3P.txt" = />

    <appendToFile = value=3D"true" />

    <rollingStyle = value=3D"Size" />

    <maxSizeRollBackups = value=3D"10" />

    <maximumFileSize = value=3D"50MB" />

    <staticLogFileName = value=3D"true" />

    <lockingModel = type=3D"log4net.Appender.FileAppender+MinimalLock" = />

    <layout = type=3D"log4net.Layout.PatternLayout">

=

      = <conversionPattern value=3D"%date %7level [%2thread] = %message%newline" />

    = </layout>

  = </appender>

 

  = <root>

    <level = value=3D"ALL" />

    <appender-ref = ref=3D"DebugAppender" />

  = </root>

 

  <logger = name=3D"DSI.DACSS.Transformers.FahiTransformer" = additivity=3D"false">

    <level = value=3D"NONE" />

  = </logger>

 

  <logger = name=3D"DSI.DACSS.Framework.Logger.SystemLogger" = additivity=3D"false">

    <level = value=3D"ALL" />

    <appender-ref = ref=3D"DebugAppender" />

  = </logger>

 

</log4net>

 

 

-Mat

 

------_=_NextPart_001_01CD2400.6AFA3B63--