You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Ron Grabowski (JIRA)" <ji...@apache.org> on 2008/08/24 17:35:45 UTC

[jira] Commented: (LOG4NET-10) Add %v pattern to output assembly version

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

Ron Grabowski commented on LOG4NET-10:
--------------------------------------

Mark, I looked at your patch and started writing some test cases and realized that you added support for storing assembly information about the repository. I think what Daniel and Nicko were talking about was wanting to add assembly information from where the log event was generated. For example:
 
 log.Info("Hello World");

What version of the Company.BusinessLayer assembly did that come from?

 Company.BusinessLayer, Version=1.2.3.4, Culture=neutral, PublicKeyToken=null
 Company.BusinessLayer, Version=1.2.3.5, Culture=neutral, PublicKeyToken=null

Daniel's suggestion about "a single static call per-class using logging" seems to hint that when the first logging event is generated from the class we capture information from the calling assembly. In other words, I think they're suggesting we add an Assembly property to one of the log classes (i.e. LogImpl) instead of (or in addition to) ILoggerRepository. If that's the case we'd need a way to differenciate the %asm pattern being assembly information about the repository vs. assembly information about the calling code.

Does that make sense?

> Add %v pattern to output assembly version
> -----------------------------------------
>
>                 Key: LOG4NET-10
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-10
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 1.2.9, 1.2.10
>         Environment: From sourceforege - 775175 - Daniel Cazzulino (kzu) - dcazzulino
>            Reporter: Nicko Cadell
>            Assignee: Ron Grabowski
>            Priority: Minor
>             Fix For: 1.2.11
>
>         Attachments: asm-patterns.patch, asm-ver-desc-patterns.patch, log4net.dll
>
>
> n an environment where multiple versions of the same
> assembly is being used simultaneously by different
> applications, it's very useful to get the version of
> the assembly that is emiting the logging event.
> I'll add this right away. If you want the (rather
> trivial) code, I can post it.
> Daniel Cazzulino
> ---
> Well, the code is not trivial (to implement in a performant
> way), and our project is a little time-constrained. 
> If I can, I'll try to make it, most probably in the
> LogManager.GetLogger method (the usage pattern indicates
> this will probably be a single static call per-class using
> logging)... I don't know.
> Daniel Cazzulino

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.