You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by "Burger, Erik" <Er...@Gpxs.net> on 2005/04/21 13:44:13 UTC

Filtering on custom parameter

Hi,
 
I have an ADONetAppender set up with a custom parameter 'userID'. I would
like to be able to log DEBUG (or greater) messages for a certain user (or
number of users) only, and have the other users log only INFO (or greater)
messages. INFO is my master log level.
 
How would I go about doing this? Would one way of doing it be setting the
master log level to DEBUG and using a filter to drop all DEBUG messages from
anyone but the specified users?
 
Am I making sense at all??
 
Thanks in advance,
Erik
 
-------------------------------
Lead Developer
Research and Development Group
GPXS Wireless Ltd.
Southampton, United Kingdom
Phone: +44 (0) 23 8076 2519
Fax:   +44 (0) 23 8076 2555
Email:  <ma...@gpxs.net> erik.burger@gpxs.net
 

The information transmitted by this e-mail message is intended solely for
the use of the person to whom or entity to which it is addressed. The
message may contain information that is privileged and confidential.
Disclosure, dissemination, distribution, review, retransmission to, other
use of or taking any action in reliance upon this information by anyone
other than the intended recipient is prohibited. If you are not the intended
recipient, please do not disseminate, distribute or copy this communication,
by e-mail or otherwise. Instead, please notify us immediately by return
e-mail (including the original message with your reply) and then delete and
discard all copies of the message.

Although we have taken precautions to minimize the risk of transmitting
viruses we nevertheless advise you to carry out your own virus checks on any
attachment to this message. We accept no liability for any loss or damage
caused by viruses.

Number of logs

Posted by Kai <Ka...@nurfuerspam.de>.
Hi all,

I just want to keep the logs from the last 10 days. Is it possible to
configure this? Currently all logs are kept and none are removed. But I want
to keep them named by the day, e.g. 'log 20050421.log'. Any ideas? Thanks!

<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
<file value="Log " />
<datepattern value="yyyyMMdd&quot;.log&quot;" />
<appendToFile value="true" />
<maxSizeRollBackups value="10" />
<rollingStyle value="Date" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
	<param name="Header" value="-[New Start]-\r\n" />
	<param name="Footer" value="-[End]-\r\n" />
	<param name="ConversionPattern" value="%d [%t] %-5p %c
[%X{currentuser}.%X{instance}] - %m%n" />
</layout>
</appender>

-- 
+++ NEU: GMX DSL_Flatrate! Schon ab 14,99 EUR/Monat! +++

GMX Garantie: Surfen ohne Tempo-Limit! http://www.gmx.net/de/go/dsl