Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 33012 invoked from network); 2 Dec 2008 00:40:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Dec 2008 00:40:50 -0000 Received: (qmail 38935 invoked by uid 500); 2 Dec 2008 00:41:01 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 38910 invoked by uid 500); 2 Dec 2008 00:41:01 -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 38899 invoked by uid 99); 2 Dec 2008 00:41:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2008 16:41:01 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of WaldenL@techsoftinc.com designates 216.150.133.132 as permitted sender) Received: from [216.150.133.132] (HELO mail.techsoftwareinc.net) (216.150.133.132) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 00:39:31 +0000 Subject: RE: Best Way to Set Up Massive Number of Loggers MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C95416.7F5A1AE7" Content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Mon, 1 Dec 2008 19:39:55 -0500 Message-ID: <43A10173A6B4F54BACFACFB39EBD47553314AF@ex2.techsoftwareinc.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Best Way to Set Up Massive Number of Loggers Thread-Index: AclUFWBRNd0mT1qlQYKX7yxvKgT3jwAAMLbA References: From: "Walden H. Leverich" To: "Log4NET User" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C95416.7F5A1AE7 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Since you're asking for thoughts... bad idea. To me log4net is plumbing, that is it's programmer based stuff. Sounds to me like you're attempting to use it to satisfy a user requirement. I think you'd be better off adding the logging as part of the business processing. Now, having said that, there are still times when it's nice to know which trading partner you're dealing with on a log message. In that case I'd push the partner id into the NDC at the start of the process, and pop it at the end. That way you'll have it in the log (if you format it correctly). You'll have a single log file, but you can always fgrep it. We do something similar with several levels of NDC and can quickly come up with a issue-specific logfile using grep. =20 -Walden =20 --=20 Walden H Leverich III Tech Software (516) 627-3800 x3051 WaldenL@TechSoftInc.com http://www.TechSoftInc.com =20 =20 Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.) =20 From: Eric Marthinsen [mailto:emarthinsen@agilecommerce.com]=20 Sent: Monday, December 01, 2008 7:31 PM To: log4net-user@logging.apache.org Subject: Best Way to Set Up Massive Number of Loggers =20 Hello- I'm working on an app that coordinates data transfers among multiple trading partners. I want to create a log file for each trading partner. I had a few ideas of how to do this, but am not sure which would be considered the optimal way. The expected number of trading partners is likely to be around 100, but could be higher. Here are my thoughts: 1. Add a bunch of named loggers to my log4net.config file 2. Do programmatic configuration of the loggers on application start 3. Write my own appender that is based on the RollingFileAppender Do any of these scream out as being a good or bad solution? Is there a better approach that I might be missing? Thanks in advance. Regards, Eric ------_=_NextPart_001_01C95416.7F5A1AE7 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Since you're asking for thoughts... bad idea. To me = log4net is plumbing, that is it's programmer based stuff. Sounds to me like you're = attempting to use it to satisfy a user requirement. I think you'd be better off = adding the logging as part of the business processing. Now, having said that, there = are still times when it's nice to know which trading partner you're dealing = with on a log message. In that case I'd push the partner id into the NDC at the = start of the process, and pop it at the end. That way you'll have it in the = log (if you format it correctly). You'll have a single log file, but you can = always fgrep it. We do something similar with several levels of NDC and can = quickly come up with a issue-specific logfile using grep.

 

-Walden

 

--

Walden H Leverich III

Tech Software

(516) 627-3800 x3051

WaldenL@TechSoftInc.com<= /o:p>

http://www.TechSoftInc.com<= /o:p>

 

Quiquid latine dictum sit altum = viditur.

(Whatever is said in Latin seems = profound.)

 

From:= Eric = Marthinsen [mailto:emarthinsen@agilecommerce.com]
Sent: Monday, December 01, 2008 7:31 PM
To: log4net-user@logging.apache.org
Subject: Best Way to Set Up Massive Number of = Loggers

 

Hello-

I'm working on an app that coordinates data transfers among multiple = trading partners. I want to create a log file for each trading partner. I had a = few ideas of how to do this, but am not sure which would be considered the = optimal way. The expected number of trading partners is likely to be around 100, = but could be higher. Here are my thoughts:

1. Add a bunch of named loggers to my log4net.config file
2. Do programmatic configuration of the loggers on application start
3. Write my own appender that is based on the RollingFileAppender

Do any of these scream out as being a good or bad solution? Is there a = better approach that I might be missing? Thanks in advance.

Regards,
Eric

------_=_NextPart_001_01C95416.7F5A1AE7--