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

Appearance settings

NdlcTiming Layout Renderer

Rolf Kristensen edited this page Dec 2, 2022 · 3 revisions

NDLC allows one to give a scope name for an operation that can be async. When the scope begins then it automatically captures a timestamp. This can be used to show duration of the active scope.

Platforms Supported: All

Introduced in NLog 4.5

NLog 5.0 introduces ScopeContext that unifies MDLC + MDC into a single context.

See also NLog Context.

Configuration Syntax

${ndlctiming:currentScope=Boolean:scopeBeginTime=Boolean:format=String}

Parameters

Rendering Options

  • currentScope - Whether to only include the duration of the last scope created. Boolean. Default False.
  • scopeBeginTime - Whether to just display the scope creation time, and not the duration. Boolean. Default False
  • format - TimeSpan format. Can be any argument accepted by TimeSpan.ToString(format). string. Default null

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.