-
Notifications
You must be signed in to change notification settings - Fork 26
FormControlTarget
Rolf Kristensen edited this page May 4, 2024
·
8 revisions
Logs text to Windows.Forms.Control.Text property control of specified Name.
Platforms Supported: .NetFramework + .NetCore3.1 + NET6.0 + NET8.0 - Requires nuget-package NLog.Windows.Forms
<targets>
<target xsi:type="FormControl"
name="String"
layout="Layout"
append="Boolean"
reverseOrder="Boolean"
controlName="String"
formName="String" />
</targets>
Read more about using the Configuration File.
name - Name of the target.
layout - Layout used to format log messages. Layout Required. Default:
${longdate}|${level:uppercase=true}|${logger}|${message}
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.