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

ObjectPath Layout Renderer

Ben Johnson edited this pageNov 11, 2019 ·4 revisions

Render a property of an object.

Introducted in NLog 4.6.7

Platforms Supported:All

Configuration Syntax

${object-path:${exception}:path=String:Format=String:Culture=String}${exception:objectpath=String} // Ambient way

Parameters

Rendering Options

  • objectpath - Path to the property. Nested properties are supported. Arrays aren't supported.
  • format - Format when rendering.
  • culture - Culture code used for formatting.

Example

Assume we catchnew ExternalException("Exception with errorCode", 5000)

${exception:objectpath=HResult} // results in 5000${object-path:${exception}:path=HResult:Culture=NL-nl:format=N2}"; // results in 5.000,00

-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