-
Notifications
You must be signed in to change notification settings - Fork 0
AppSetting Layout Renderer
Julian edited this page Jan 25, 2015
·
5 revisions
Value from the App Settings configuration
From NLog 3.0+, in NLog.Extended
##Configuration Syntax
${appsetting:name=String:default=String}
##Parameters ###Rendering Options
- name - Key in the apps setting. Required.
- Default - Default value if not present. Optional.
##Example Example .config
<configuration>
<appSettings>
<add key="MyKey" value="MyApplication" />
</appSettings>
</configuration>
Example renderer: produces MyApplication
is this case.
${appsetting:name=MyKey:default=mydefault}
Example#2 renderer: produces mydefault
is this case.
${appsetting:name=MyKey2:default=mydefault}
- Search in documentation
- Getting started
- Examples
- External articles and tutorials
- FAQ
- Platform support
- Advanced Configuration file options
- Filtering log messages
- [Using Time Sources](Time Source)
- Visual Studio support
- Who is using NLog
- [Write custom extensions](Extending NLog)