-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Environment layout renderer
Rolf Kristensen edited this page Nov 27, 2021
·
10 revisions
The environment variable like Path, TMP, PROCESSOR_ARCHITECTURE etc.
Platforms Supported: All
${environment:variable=String}
- variable - Name of the environment variable. Required. Examples: Path, TMP, USERPROFILE, PROCESSOR_ARCHITECTURE
-
To list all environment variables in your system:
Environment.GetEnvironmentVariables()
-
These are the environment variables, not the properties listed at Environment Class on MSDN
log file for 32 bits systems in folder 32 and otherwise in folder 64
<target
xsi:type="File"
name="file1"
fileName="c:\temp\${when:when='${environment:PROCESSOR_ARCHITECTURE}'='X86':inner=32:else=64}\file.log" />
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
- Articles about NLog
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json