-
Notifications
You must be signed in to change notification settings - Fork 1.4k
FileContents layout renderer
Rolf Kristensen edited this page Nov 28, 2021
·
4 revisions
Renders contents of the specified file. Example if having a flat file containing a special setting value.
Platforms Supported: All
${file-contents:encoding=Encoding:fileName=Layout}
- encoding - Encoding used in the file.Encoding
- fileName - Name of the file.Layout
If the file content doesn't change, then adding the option :cached=true
will give a performance boost.
- 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