-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Basedir layout renderer
Rolf Kristensen edited this page Nov 22, 2023
·
12 revisions
The current application AppDomain.BaseDirectory, and usually the location of application-binaries.
Platforms Supported: All
See also ${processdir}, ${specialfolder}, ${currentdir}, ${tempdir}
${basedir:dir=String:file=String:processDir=boolean}
- dir - Name of the directory to be Path.Combine()'d with the base directory.
- file - Name of the file to be Path.Combine()'d with the base directory.
-
processDir - Introduced in NLog 4.4.2. Render the base directory of the current process? Default
false
.Alternative one can use the
${processdir}
introduced with NLog v4.7.1 -
fixTempDir - Enable automatic fallback to processDir when detecting AppDomain.BaseDirectory is temp-directory. Workaround for single-file-publish on NetCore 3.1, and no longer needed with .NET 6.
Introduced with NLog v4.6.8
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