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 "Martin Meixger (Commented) (JIRA)" <ji...@apache.org> on 2012/01/03 09:04:20 UTC

[jira] [Commented] (LOG4NET-87) Support ASP.Net related PatternConverters to allow items from the HttpContext.Current.Session, Cache, Request, etc. to be captured.

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

Martin Meixger commented on LOG4NET-87:
---------------------------------------

The AspNetPatternLayoutConverter retrieves the HttpContext.Current properties only when the LoggingEvent gets rendered via Format().

Unforunately this is much later and in another thread as the fixing of the fields and ThreadProperties.

I see no other way than copying the interested HttpContext properties manually into the ThreadProperties.
                
> Support ASP.Net related PatternConverters to allow items from the HttpContext.Current.Session, Cache, Request, etc. to be captured.
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4NET-87
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-87
>             Project: Log4net
>          Issue Type: Wish
>          Components: Core
>    Affects Versions: 1.2.10
>            Reporter: Ron Grabowski
>            Assignee: Ron Grabowski
>            Priority: Minor
>             Fix For: 1.2.11
>
>
> It would be nice if there were built-in Pattern Converters to support core ASP.Net objects:
>  %aspnet-session{UserId}
>  %aspnet-session
>  %aspnet-request{ProductId}
> This issue may be a good time to investigate supporting a more advanced syntax for the Option parameter:
>  %aspnet-request{queryString:ProductId}
> that could be shared across all Pattern Converters.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira