Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 95784 invoked from network); 3 Aug 2006 13:28:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Aug 2006 13:28:12 -0000 Received: (qmail 64182 invoked by uid 500); 3 Aug 2006 13:28:10 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 64160 invoked by uid 500); 3 Aug 2006 13:28:10 -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 64147 invoked by uid 99); 3 Aug 2006 13:28:10 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 06:28:10 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [143.101.113.2] (HELO mailout2.dl.nec.com) (143.101.113.2) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 06:28:09 -0700 Received: from ufsmail1.ufs.prv ([172.24.172.72]) by mailout2.dl.nec.com (8.13.6/8.13.6) with ESMTP id k73DPgi3006355 for ; Thu, 3 Aug 2006 08:25:42 -0500 (CDT) 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_01C6B700.997BE60C" Subject: configurable file purging and logging to two files Date: Thu, 3 Aug 2006 08:27:24 -0500 Message-ID: <52DD50B323169C4BAE287079F6B9D8F30CA246@ufsmail1.ufs.prv> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: configurable file purging and logging to two files Thread-Index: Aca2/uLqwKgB7vm/TVaWDmRs6S8HuAAANXvA From: "Scribner, Aaron" To: "Log4NET User" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C6B700.997BE60C Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable 1) Is there a configuration option for having files, say older than 14 days, purged from the hard drive? =20 2) I am logging particular events to a separate file and have that working. The problem arises from the fact that these events are logged both to my main log file and also to the separate file. What in my configuration needs some tweaking? =20 =20 =20 =20 =20 =20 =20 Aaron Scribner Software Engineer NEC Unified Solutions, Inc. ------_=_NextPart_001_01C6B700.997BE60C Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable
1) Is there a configuration option for having = files,=20 say older than 14 days, purged from the hard drive?
 
2) I am logging particular events to a = separate file=20 and have that working. The problem arises from the fact that these = events are=20 logged both to my main log file and also to the separate file. What in = my=20 configuration needs some tweaking?
 
 <log4net>
  <appender = name=3D"WndAppender"=20 type=3D"CustomAppenderes.InternalAppender,=20 InternalAppender">
   <layout=20 type=3D"log4net.Layout.PatternLayout">
    <= param=20 name=3D"ConversionPattern" value=3D"%d{HH:mm:ss} [%t]\t%-5p\t%c{3} [%x] = -=20 %m"/>
          &= nbsp;     =20
   </layout>
  </appender>  <appender=20 name=3D"TraceAppender" type=3D"log4net.Appender.TraceAppender"=20 >
   <layout=20 type=3D"log4net.Layout.PatternLayout">
    <= param=20 name=3D"ConversionPattern" value=3D"%d [%t] %-5p %c [%x] - %m%n"=20 />
   </layout>
  </appender&g= t;
  
  <appender=20 name=3D"LogFileAppender"=20 type=3D"log4net.Appender.RollingFileAppender">
   &l= t;param=20 name=3D"File" value=3D"./Logs/log-file.txt" = />
   <param=20 name=3D"AppendToFile" value=3D"true" = />
   <param=20 name=3D"MaxSizeRollBackups" value=3D"20" = />
   <param=20 name=3D"MaximumFileSize" value=3D"100MB" = />
   <param=20 name=3D"StaticLogFileName" value=3D"true" = />
   <layout=20 type=3D"log4net.Layout.PatternLayout">
    <= param=20 name=3D"Header" value=3D"[ Logging start ... ]\r\n"=20 />
    <param name=3D"Footer" value=3D"[ = Logging end=20 ... ]\r\n" />
    <param = name=3D"ConversionPattern"=20 value=3D"%d [%t] %-5p %c [%x] &lt;%X{auth}&gt; - %m %n "=20 />
   </layout>
  </appender&g= t;
 
  <appender=20 name=3D"MsgsAppender" type=3D"log4net.Appender.RollingFileAppender"=20 >
   <param name=3D"File" = value=3D"./Logs/Msgs.log"=20 />
   <param name=3D"AppendToFile" = value=3D"true"=20 />
   <param name=3D"MaxSizeRollBackups" = value=3D"20"=20 />
   <param name=3D"MaximumFileSize" = value=3D"100MB"=20 />
   <param name=3D"StaticLogFileName" = value=3D"true"=20 />
   <layout=20 type=3D"log4net.Layout.PatternLayout">
    <= param=20 name=3D"ConversionPattern" value=3D"%d{HH:mm:ss,fff} %m %n"=20 />
   </layout>
  </appender&g= t;
   
  <!--=20 Setup the root category, add the appenders and set the default level=20 -->
  <root>
   <level = value=3D"ERROR"=20 />
   <appender-ref ref=3D"LogFileAppender"=20 />
   <appender-ref ref=3D"WndAppender"=20 />
   <appender-ref ref=3D"TraceAppender"=20 />   
  </root>
  <l= ogger=20 name=3D"ACDPCD.CoreClass">
    <level = value=3D"ALL"=20 />
    <appender-ref ref=3D "MsgsAppender"=20 />
  </logger>
 </log4net>
 
Aaron Scribner
Software Engineer
NEC Unified Solutions,=20 Inc.
------_=_NextPart_001_01C6B700.997BE60C--