-
Notifications
You must be signed in to change notification settings - Fork 1.4k
CurrentDir Layout Renderer
Rolf Kristensen edited this page Jun 22, 2025
·
9 revisions
The current working directory of the application.
Platforms Supported: All
Introduced in NLog v4.5.
See also ${basedir}, ${specialfolder}, ${processdir}, ${tempdir}
${currentdir:dir=String:file=String}
-
dir: Name of the directory to be Path.Combine()'d with the current directory.
-
file: Name of the file to be Path.Combine()'d with the current directory.
Applications can change their current directory, so NLog resolves the current directory without caching. If not expecting current directory to be changed, then enabling caching will improve performance: ${currentdir:cached=true}
See also: FileTarget FileName Directory
- 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