-
Notifications
You must be signed in to change notification settings - Fork 1.4k
OnHasProperties Layout Renderer
Rolf Kristensen edited this page Oct 25, 2022
·
3 revisions
Only outputs the inner layout when event properties from structured logging are included with the logevent.
Platforms Supported: All
Introduced with NLog 4.7
${onHasProperties:inner=Layout}
- inner - Wrapped layout. Layout
- else - Layout if the condition is not true (introduced in NLog 5.0.5)
${onHasProperties:, Properties\: ${all-event-properties}}
- 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