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

JSON Encode Layout Renderer

Julian Verdurmen edited this pageOct 25, 2019 ·8 revisions

Escapes output of another layout using JSON rules.

Platforms Supported:All

Configuration Syntax

${json-encode:jsonEncode=Boolean:inner=Layout}

or by using ambient property to modify output of other layout renderer:

${other:jsonEncode=Boolean}

Parameters

Transformation Options

  • jsonEncode - Indicates whether to apply JSON encoding. Boolean Default: True
  • escapeUnicode - Indicates whether it should escape unicode characters (non-ascii) using\u. Boolean Default: True

    Introduced in NLog 4.4.7

  • inner - Wrapped layout. Layout
  • EscapeForwardSlash - Should forward slashes be escaped? If true,/ will be converted to\/. Defaulttrue

    Introduced in NLog 4.6.8

Example

${event-properties:item=MyValue:jsonEncode=true}

-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