Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 25343 invoked from network); 20 Aug 2010 14:24:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Aug 2010 14:24:08 -0000 Received: (qmail 37310 invoked by uid 500); 20 Aug 2010 14:24:08 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 37095 invoked by uid 500); 20 Aug 2010 14:24:06 -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 37081 invoked by uid 99); 20 Aug 2010 14:24:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Aug 2010 14:24:05 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of damianzet1@wp.pl designates 212.77.101.7 as permitted sender) Received: from [212.77.101.7] (HELO mx3.wp.pl) (212.77.101.7) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Aug 2010 14:23:57 +0000 Received: (wp-smtpd smtp.wp.pl 4816 invoked from network); 20 Aug 2010 16:23:36 +0200 Received: from out.poczta.wp.pl (HELO localhost) ([212.77.101.240]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with SMTP for ; 20 Aug 2010 16:23:36 +0200 Date: Fri, 20 Aug 2010 16:23:35 +0200 From: "Damian Zembalski" To: log4net-user@logging.apache.org Subject: Set log name in appender of log4net Message-ID: <4c6e8fe7e2eba2.07981568@wp.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Mailer: Interfejs WWW nowej poczty Wirtualnej Polski X-User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.126 Safari/533.4 Organization: Poznaj Poczt� WP http://poczta.wp.pl/info-start.html X-WP-IP: 89.25.186.114 X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000000 [cQPE] I have class MyLogger, where I use log4net. How can I modify my appender to save log in specific logname (I want to set it by parameter logName). public void AddEntry(string source, string logName, string contextInfo, string message, EventLogEntryType eventType) { log4net.ILog Log = log4net.LogManager.GetLogger(source); Log.Error(String.Format("Context Info: {0}{1}{2}{3}", contextInfo, Environment.NewLine, Environment.NewLine, message)); } This is myAppender. Now it writes in common logtype Application.