Click or drag to resize

AppSettingLayoutRenderer Class

Render value for Application setting retrieved from App.config or Web.config file.
Inheritance Hierarchy
SystemObject
  NLog.LayoutRenderersLayoutRenderer
    NLog.LayoutRenderersAppSettingLayoutRenderer

Namespace:  NLog.LayoutRenderers
Assembly:  NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax
public sealed class AppSettingLayoutRenderer : LayoutRenderer

The AppSettingLayoutRenderer type exposes the following members.

Constructors
  NameDescription
Public methodAppSettingLayoutRenderer
Initializes a new instance of the AppSettingLayoutRenderer class
Top
Properties
  NameDescription
Public propertyDefault
The default value to render if the AppSetting value is null.
Public propertyItem
The AppSetting item-name
Top
Methods
  NameDescription
Public methodRender
Renders the value of layout renderer in the context of the specified log event.
(Inherited from LayoutRenderer.)
Public methodToString
Returns a string that represents the current object.
(Inherited from LayoutRenderer.)
Top
Remarks
NLog Layout Renderer
1${appsetting:item=mysetting:default=mydefault} - produces "mydefault" if no appsetting
See NLog Wiki
See Also