Click or drag to resize
CustomDbgOutputTarget Class
A NLog Target implementation that will write log messages using OutputDebugString, filtering out outporcess messages.
Inheritance Hierarchy
SystemObject
  Target
    TargetWithLayout
      BlackBerry.Workspaces.NlogExtensionsCustomDbgOutputTarget

Namespace:  BlackBerry.Workspaces.NlogExtensions
Assembly:  BlackBerryWorkspacesSDK (in BlackBerryWorkspacesSDK.dll) Version: 7.0.0.223 (7.0.0.223)
Syntax
C#
public class CustomDbgOutputTarget : TargetWithLayout

The CustomDbgOutputTarget type exposes the following members.

Constructors
  NameDescription
Public methodCustomDbgOutputTarget
Initializes a new instance of the CustomDbgOutputTarget class
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
To use the CustomDbgOutputTarget add a section element for nlog to the configSections element of app.config. Then add the Nlog configuration as a nlog element.
<configSections>
  <section name = "nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
</configSections>

<nlog autoReload="true" xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <extensions>
    <add assembly = "WorkspacesSdkCore" />
  </extensions>

  <targets>
    <target name="ods" xsi:type="CustomDbgOutput" layout="${message}" />
  </targets>

  <rules>
    <logger name = "*" minlevel="Trace" writeTo="ods"/>
  </rules>
</nlog>
See Also