Click or drag to resize
WorkspacesLogger Class
Provides logging services for the Workspaces SDK. Currently uses NLog as the underlying logging provider.
Inheritance Hierarchy
SystemObject
  BlackBerry.Workspaces.LoggerWorkspacesLogger

Namespace:  BlackBerry.Workspaces.Logger
Assembly:  BlackBerryWorkspacesSDK (in BlackBerryWorkspacesSDK.dll) Version: 7.0.0.223 (7.0.0.223)
Syntax
C#
public class WorkspacesLogger

The WorkspacesLogger type exposes the following members.

Properties
  NameDescription
Public propertyIsDebugEnabled
Indicates if logging is enabled at DEBUG level
Public propertyIsErrorEnabled
Indicates if logging is enabled at ERROR level
Public propertyIsFatalEnabled
Indicates if logging is enabled at FATAL level
Public propertyIsInfoEnabled
Indicates if logging is enabled at INFO level
Public propertyIsTraceEnabled
Indicates if logging is enabled at TRACE level
Public propertyIsWarnEnabled
Indicates if logging is enabled at WARN level
Top
Methods
  NameDescription
Public methodDebug(String, Object)
Logs a message at the DEBUG log level
Public methodDebug(Exception, String, Object)
Logs an exception at the DEBUG log level
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodError(String, Object)
Logs a message at the ERROR log level
Public methodError(Exception, String, Object)
Logs an exception at the ERROR log level
Public methodFatal(String, Object)
Logs a message at the FATAL log level
Public methodFatal(Exception, String, Object)
Logs an exception at the FATAL log level
Public methodStatic memberGetAssemblyLogger
Get a logger for the calling assembly
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodStatic memberGetLoggerT
Get a logger by type
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInfo(String, Object)
Logs a message at the INFO log level
Public methodInfo(Exception, String, Object)
Logs an exception at the INFO log level
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTrace(String, Object)
Logs a message at the TRACE log level
Public methodTrace(Exception, String, Object)
Logs an exception at the TRACE log level
Public methodWarn(String, Object)
Logs a message at the WARN log level
Public methodWarn(Exception, String, Object)
Logs an exception at the WARN log level
Top
Fields
  NameDescription
Public fieldStatic memberLog
Static WorkspacesLogger associated with the calling assembly.
Top
Remarks
To configure logging add a "section" element for nlog to the "configSections" element of app.config. Then add the Nlog configuration as a nlog element. See https://github.com/NLog/NLog/wiki/Tutorial#configuration
<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">
  <targets>
    <target name="logfile" xsi:type="File" fileName="${basedir}/workspacessdk.log" layout="${message}" keepFileOpen="true" />
    <target name="console" xsi:type="ColoredConsole" layout="${date:format=HH\:MM\:ss} ${logger} ${message}"/>
  </targets>
  <rules>
    <logger name = "*" minlevel="Trace" writeTo="logfile, console"/>
  </rules>
</nlog>
See Also