Skip to content

ToolStripItem Target

Rolf Kristensen edited this page Aug 2, 2023 · 3 revisions

Logs text to Windows.Forms.ToolStripItem property control of specified Name.

Platforms Supported: .NetFramework + NETCore3.1 + NET6.0 - Requires nuget-package NLog.Windows.Forms v4.6

Configuration Syntax

<targets>
  <target xsi:type="ToolStripItem"
          name="String"
          layout="Layout"
          itemName="Layout"
          toolStripName="Layout"
          formName="Layout" />
</targets>

Read more about using the Configuration File.

Parameters

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:withexception=true}

Form Options

  • itemName - Layout that resolves to the name of the ToolStripItem to which NLog will log write log text. Layout Required

  • toolStripName - Layout that resolves to the name of ToolStrip that contains the ToolStripItem to which NLog will log write log text. Layout Required.

  • formName - Layout that resolves to the name of the Form on which the ToolStrip is located. Layout

Clone this wiki locally