Registry Layout Renderer
A value from the Registry.
Platforms Supported: All - Requires nuget-package NLog.WindowsRegistry with NLog 5.0
${registry:value=Layout:key=Layout:defaultValue=Layout:view=enum:requireEscapingSlashesInDefaultValue=boolean}
-
value - Registry value name. Since NLog 4.3 a
Layout
. BeforeString
. -
key - Registry key. Required. Since NLog 4.3 a
Layout
. BeforeString
. Must have the form: hive/key/subkey/name Possible hives: HKLM/HKEY_LOCAL_MACHINE/HKCU/HKEY_CURRENT_USER Also possible since NLog 4.3: HKEY_CLASSES_ROOT/HKEY_USERS/HKEY_CURRENT_CONFIG/HKEY_DYN_DATA/HKEY_PERFORMANCE_DATA -
defaultValue - Value to be output when the specified registry key or value is not found. Since NLog 4.3 a
Layout
. BeforeString
. -
RequireEscapingSlashesInDefaultValue - Introduced in NLog 4.3
boolean
. Require escaping backward slashes inDefaultValue
. Need to be backwardscompatible. Defaulttrue
. Will be removed in the future. -
View - Introduced in NLog 4.3 . Registry32, Registry64, Default
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json