Skip to content

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}

Configuration Syntax

${currentdir:dir=String:file=String}

Parameters

Advanced Options

  • 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.

Notes

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

Clone this wiki locally