-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Callsite line number layout renderer
Rolf Kristensen edited this page Jun 22, 2025
·
11 revisions
The call site source-code line-number. For full callsite use ${callsite}
Platforms Supported: All
Introduced in NLog v4.1
${callsite-linenumber:skipFrames=Integer}
- skipFrames - The number of frames to skip. Integer Default: 0
-
captureStackTrace - Logger should capture StackTrace, if it was not provided manually. Default: true
Introduced with NLog 4.7.1
Please also note that this infers heavy performance hit when doing lots of logging, as it has to capture full StackTrace for every log message.
If symbol symbol information is not available, then it will only output source-code line-number 0
. Symbol information from PDB files must be deployed with the application to retrieve and output source-code line-number. For applications compiled in release mode, then inlining can occur and cause "unexpected" line-numbers.
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
- Articles about NLog
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json