[
https://issues.apache.org/jira/browse/LOG4NET-154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708664#action_12708664
]
Michael Cromwell commented on LOG4NET-154:
------------------------------------------
I may be wrong as I haven't spent much time in the code but it looks like the
LocationInfo is loaded on demand at the moment, through the LocationInformation
property on LoggingEvent:
public LocationInfo LocationInformation
{
get
{
if (m_data.LocationInfo == null && this.m_cacheUpdatable)
{
m_data.LocationInfo = new
LocationInfo(m_callerStackBoundaryDeclaringType);
}
return m_data.LocationInfo;
}
}
And only the pattern converters that need the stacktrace details access this
property such as FileLocationPatternConverter, FullLocationPatternConverter,
LineLocationPatternConverter etc... so if only the simple pattern converters
are used it should not be loading the stack trace and therefore not affecting
performance.
Thanks,
Mike
> Add a StackTracePatternConverter to display method calls leading up to log
> message
> ----------------------------------------------------------------------------------
>
> Key: LOG4NET-154
> URL: https://issues.apache.org/jira/browse/LOG4NET-154
> Project: Log4net
> Issue Type: New Feature
> Reporter: Ron Grabowski
> Fix For: 1.2.11
>
> Attachments: StackTracePatternConverter.zip
>
>
> Modify LocationInfo to save StackTrace information and make it available as
> StackTracePatternConverter to display call stack leading up to the log
> message:
> log.Debug("Item Saved");
>
> [%stackTrace{3}] %message%newline
> [default_aspx.btnSubmit_Click > productController.Save >
> productService.Save] Item Saved
> This will probably be a slow pattern converter on par with other LocationInfo
> derived pattern converters.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.