logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gian Marco Gherardi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4NET-400) ILog extension methods doesnt work as expected
Date Fri, 11 Oct 2013 07:32:42 GMT

     [ https://issues.apache.org/jira/browse/LOG4NET-400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gian Marco Gherardi updated LOG4NET-400:
----------------------------------------

    Description: 
Hi, I'm trying the feature LOG4NET-394, but seems that the following format doesn't work:

  log.Debug( m=>m("value= {0}", obj.Value) ); 

Instead this seems the correct signature:

  log.Debug(() => string.Format("value= {0}", obj.Value));

That is not as convenient IMO. Another thing I've noticed is that there are also many extension
methods that merely proxy the methods already supported by plain ILog. What's the reason for
that? I mean ILog methods already skip logging if level is not active.

  was:
Hi, I'm trying this feature, but seems that the following format doesn't work:

  log.Debug( m=>m("value= {0}", obj.Value) ); 

Instead this seems the correct signature:

  log.Debug(() => string.Format("value= {0}", obj.Value));

That is not as convenient IMO. Another thing I've noticed is that there are also many extension
methods that merely proxy the methods already supported by plain ILog. What's the reason for
that? I mean ILog methods already skip logging if level is not active.


> ILog extension methods doesnt work as expected
> ----------------------------------------------
>
>                 Key: LOG4NET-400
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-400
>             Project: Log4net
>          Issue Type: Improvement
>            Reporter: Gian Marco Gherardi
>
> Hi, I'm trying the feature LOG4NET-394, but seems that the following format doesn't work:
>   log.Debug( m=>m("value= {0}", obj.Value) ); 
> Instead this seems the correct signature:
>   log.Debug(() => string.Format("value= {0}", obj.Value));
> That is not as convenient IMO. Another thing I've noticed is that there are also many
extension methods that merely proxy the methods already supported by plain ILog. What's the
reason for that? I mean ILog methods already skip logging if level is not active.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message