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

AspNetTraceIdentifier Layout Renderer

Rolf Kristensen edited this pageJun 10, 2023 ·8 revisions

ASP.NET Trace Identifier

Platforms Supported:All (Supported inASP.NET Core andASP.NET)

Introduced in NLog.Web.AspNetCore ver. 4.3.1 and NLog.Web ver. 4.7.1

Configuration Syntax

${aspnet-TraceIdentifier:ignoreActivityId=boolean}

Options:

  • ignoreActivityId: Only ASP.NET Core. UseHttpContext.TraceIdentifier instead ofSystem.Diagnostics.Activity.Current.Id

Notes

Which TraceIdentifier is used?

  • ASP.NET Core 3: by defaultSystem.Diagnostics.Activity.Current.Id.
  • ASP.NET Core 1+2:HttpContext.TraceIdentifier
  • ASP.NET:HttpWorkerRequest.RequestTraceIdentifier.

Seecode

-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-2026 Movatter.jp