Return-Path: X-Original-To: apmail-logging-log4net-dev-archive@www.apache.org Delivered-To: apmail-logging-log4net-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C8CE7705 for ; Tue, 6 Sep 2011 16:20:35 +0000 (UTC) Received: (qmail 77576 invoked by uid 500); 6 Sep 2011 16:20:35 -0000 Delivered-To: apmail-logging-log4net-dev-archive@logging.apache.org Received: (qmail 77207 invoked by uid 500); 6 Sep 2011 16:20:34 -0000 Mailing-List: contact log4net-dev-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET Dev" List-Id: Delivered-To: mailing list log4net-dev@logging.apache.org Received: (qmail 77199 invoked by uid 99); 6 Sep 2011 16:20:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 16:20:34 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 16:20:31 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E5C3B830AA for ; Tue, 6 Sep 2011 16:20:09 +0000 (UTC) Date: Tue, 6 Sep 2011 16:20:09 +0000 (UTC) From: "Stefan Bodewig (JIRA)" To: log4net-dev@logging.apache.org Message-ID: <1674920915.21020.1315326009937.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <23928941.24831293416565227.JavaMail.jira@thor> Subject: [jira] [Updated] (LOG4NET-281) Insufficient Granularity on Log methods in ILog MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LOG4NET-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Bodewig updated LOG4NET-281: ----------------------------------- Fix Version/s: (was: 1.2.11) 2.0 Putting it back to a release where we are willing to break backwards compatibility. You could always bypass ILog's convenience layer and use the ILogger instance avaliable via the Logger property directly. > Insufficient Granularity on Log methods in ILog > ----------------------------------------------- > > Key: LOG4NET-281 > URL: https://issues.apache.org/jira/browse/LOG4NET-281 > Project: Log4net > Issue Type: New Feature > Components: Core > Affects Versions: 1.2.10 > Environment: All Environments > Reporter: Zev > Fix For: 2.0 > > Original Estimate: 2h > Remaining Estimate: 2h > > The driver for this change is that we are unable to log certain event types from the ILog object. While we can use the Logger object, it is easier to have them here. > updated code: > ILog.cs > //start new > void Emergency(object message); > void Emergency(object message, Exception e); > void Alert(object message); > void Alert(object message, Exception e); > void Critical(object message); > void Critical(object message, Exception e); > void Notice(object message); > void Notice(object message, Exception e); > //end new > LogImpl.cs (in ReloadLevels) > //start new > m_levelEmergency = levelMap.LookupWithDefault(Level.Emergency); > m_levelAlert = levelMap.LookupWithDefault(Level.Alert); > m_levelCritical = levelMap.LookupWithDefault(Level.Critical); > m_levelNotice = levelMap.LookupWithDefault(Level.Notice); > //end new > methods: > //start new > virtual public void Emergency(object message) > { > Logger.Log(ThisDeclaringType, m_levelEmergency, message, null); > } > virtual public void Emergency(object message, Exception exception) > { > Logger.Log(ThisDeclaringType, m_levelEmergency, message, exception); > } > virtual public void Alert(object message) > { > Logger.Log(ThisDeclaringType, m_levelAlert, message, null); > } > virtual public void Alert(object message, Exception exception) > { > Logger.Log(ThisDeclaringType, m_levelAlert, message, exception); > } > virtual public void Critical(object message) > { > Logger.Log(ThisDeclaringType, m_levelCritical, message, null); > } > virtual public void Critical(object message, Exception exception) > { > Logger.Log(ThisDeclaringType, m_levelCritical, message, exception); > } > virtual public void Notice(object message) > { > Logger.Log(ThisDeclaringType, m_levelNotice, message, null); > } > virtual public void Notice(object message, Exception exception) > { > Logger.Log(ThisDeclaringType, m_levelNotice, message, exception); > } > //end new > private fields: > //start new > private Level m_levelEmergency; > private Level m_levelAlert; > private Level m_levelCritical; > private Level m_levelNotice; > //end new -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira