You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In many cases - we need a lot more info, like inner exceptions. Which could go to multiple levels.
In NLog File layout we can specify something like this: <target name="f" type="File" layout="${message}${onexception:EXCEPTION OCCURRED\:${exception:format=type,message,method:maxInnerExceptionLevel=5:innerFormat=shortType,message,method}}" /> to log inner exceptions, and with multiple levels. https://nlog-project.org/2011/04/20/exception-logging-enhancements.html
You could take a look here to see how they handle multiple InnerExceptions, AggregateExceptions etc.
The text was updated successfully, but these errors were encountered:
The only issue I see is, there's a limit to how much you can stuff in each graylog message.
Then it should be trimmed right?
Would you think it's reasonable for a setting to do that automatically?
Yes because it would be duplication of code to do it everywhere you have a logger.Error(ex) call.
Also if you have several NLog configurations, one of them sends to a file, another to graylog - it's weird if one can log inner exceptions and the other dont.
In many cases - we need a lot more info, like inner exceptions. Which could go to multiple levels.
In NLog
File
layout we can specify something like this:<target name="f" type="File" layout="${message}${onexception:EXCEPTION OCCURRED\:${exception:format=type,message,method:maxInnerExceptionLevel=5:innerFormat=shortType,message,method}}" />
to log inner exceptions, and with multiple levels.https://nlog-project.org/2011/04/20/exception-logging-enhancements.html
You could take a look here to see how they handle multiple
InnerExceptions
,AggregateExceptions
etc.The text was updated successfully, but these errors were encountered: