Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/NLogPublic

Basedir layout renderer

Rolf Kristensen edited this pageNov 22, 2023 ·12 revisions

The current applicationAppDomain.BaseDirectory, and usually the location of application-binaries.

Platforms Supported:All

See also${processdir},${specialfolder},${currentdir},${tempdir}

Configuration Syntax

${basedir:dir=String:file=String:processDir=boolean}

Parameters

Advanced Options

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

    Alternative one can use the${processdir} introduced with NLog v4.7.1

  • fixTempDir - Enable automatic fallback toprocessDir 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

Configuration

Programmatic Configuration

Advanced

Extending NLog

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp