-
Notifications
You must be signed in to change notification settings - Fork 0
NDC Layout Renderer
Julian Verdurmen edited this page Sep 18, 2016
·
3 revisions
Nested Diagnostics Context - a thread-local structure that keeps a stack of strings and provides methods to output them in layouts.
Supported in .NET, Silverlight, Compact Framework and Mono.
##Configuration Syntax
${ndc:bottomFrames=Integer:topFrames=Integer:separator=String}
##Parameters ###Rendering Options
- bottomFrames - Number of bottom stack frames to be rendered.Integer
- topFrames - Number of top stack frames to be rendered.Integer
- separator - Separator to be used for concatenating nested diagnostics context output
NestDiagnosticsContext.Push("entering method X");
...
NestDiagnosticsContext.Pop(); //leaving methods
Then in the log config:
${ndc}
- 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)