FormControl target

gerritgoetzen edited this page Sep 23, 2016 · 3 revisions
Clone this wiki locally

Logs text to Windows.Forms.Control.Text property control of specified Name.

Supported in .NET

Configuration Syntax

  <target xsi:type="FormControl"
          formName="String" />

Read more about using the Configuration File.


General Options

name - Name of the target.

Layout Options

layout - Layout used to format log messages. Layout Required. Default: ${longdate}|${level:uppercase=true}|${logger}|${message}

Form Options

append - Indicates whether log text should be appended to the text of the control instead of overwriting it. Boolean Default: True

reverseOrder - Indicates whether log text should be appended or prepended. Boolean Default: False

controlName - Name of control to which NLog will log write log text. Required.

formName - Name of the Form on which the control is located.