You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (Jira)" <ji...@apache.org> on 2020/04/04 22:30:04 UTC
[jira] [Updated] (LOG4NET-424) Log extended properties of Exception
to log file
[ https://issues.apache.org/jira/browse/LOG4NET-424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ralph Goers updated LOG4NET-424:
--------------------------------
LOG4NET is now dormant.
> Log extended properties of Exception to log file
> ------------------------------------------------
>
> Key: LOG4NET-424
> URL: https://issues.apache.org/jira/browse/LOG4NET-424
> Project: Log4net
> Issue Type: New Feature
> Affects Versions: 1.2.13
> Reporter: Dominik Rauch
> Priority: Minor
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Sometimes framework developers add properties to Exception classes but forget to add the contents of those properties to the exception message.
> E.g.:
> {code}
> class MyException : Exception
> {
> ...
> public string UsefulInfo { get; private set; }
> }
> {code}
> As we can only change our Exception classes but have no access to those frameworks, some help of the logging framework would be nice.
> It would be nice if you could configure log4net in a way to also log all properties of an Exception class as well, that are not already in the base System.Exception class (currently only Message & StackTrace are logged).
> I guess you would need to do some Reflection in order to get this to work. Yes, reflection is slow, however, we do not exception to happen such Exception logging very often.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)