-
Notifications
You must be signed in to change notification settings - Fork 0
Stack Trace Layout Renderer
Julian Verdurmen edited this page Mar 18, 2016
·
4 revisions
Render Stack trace of a log event.
Supported in .NET, Silverlight and Mono
##Configuration Syntax
${stacktrace:format=Enum:topFrames=Integer:skipFrames=Integer:separator=String}
##Parameters ###Rendering Options
-
format - Output format of the stack trace. Default: Flat
Possible values:- DetailedFlat - Detailed flat format (method signatures displayed in a single line).
- Flat - Flat format (class and method names displayed in a single line).
- Raw - Raw format (multiline - as returned by StackFrame.ToString() method).
- topFrames - Number of top stack frames to be rendered. Integer Default: 3
- skipFrames - Numberof frames to skip. Integer Default: 0
-
separator - Stack frame separator string. Default: =>. To set new line use
###Format Examples
Raw
Main at offset 638 in file:line:column :0:0
TestLogging at offset 590 in file:line:column :0:0
WriteToLog at offset 112 in file:line:column :0:0
Flat
Program.Main
Program.TestLogging
NLogLoggerHelper.LogEvent
DetailedFlat
[Int32 Main()]
[Void TestLogging()]
[Void WriteToLog(NLog.Logger, NLog.LogLevel, System.String)]
- Search in documentation
- Getting started
- Examples
- External articles and tutorials
- FAQ
- Platform support
- Advanced Configuration file options
- Filtering log messages
- [Using Time Sources](Time Source)
- Visual Studio support
- Who is using NLog
- [Write custom extensions](Extending NLog)