[ 
https://issues.apache.org/jira/browse/LOG4NET-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13628815#comment-13628815
 ] 

Pavel Nedoma commented on LOG4NET-290:
--------------------------------------

Thanks for fast reply, I agree with you on the lazy ToString solution using 
extensions. However my example was bit unfortunate, in my case there are 
various methods that are called to retrieve log message. (errrm, it's not that 
huge messy variety as it might sound from my description) Especially the case 
when some concatenation occurs is not that rare. Therefore I think that the 
lambda option could be still considered.

About the extension class included in log4net lib - I think that's a good idea, 
since now I have to reference/copy my log4net extension class to each project 
and not all projects have the need to reference some custom common library of 
mine, which could include such class. 
                
> Add Lambda-based ILog-Extensions (embedded log.IsEnabled)
> ---------------------------------------------------------
>
>                 Key: LOG4NET-290
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-290
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 1.2.10
>            Reporter: Lars Corneliussen
>             Fix For: 3.5
>
>         Attachments: ILog.cs.patch
>
>
> This statement:
>     if (log.IsDebugEnabled) log.DebugFormat("x: {0}", 123)
> Could be nicely shortened to:
>     log.Debug( m=>m("value= {0}", obj.Value) );
> I'm already apache committer (NPanday Incubator Project) and would be happy 
> to help with this interface. The simplest thing would be to offer it as 
> static Extension-Methods to ILog.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to