LAUREL BRIDGE

Program Class

DICOM Connectivity Framework V3.4
Example to configure NLog to emit log message headers using the DCF33 log message header format.
Inheritance Hierarchy

SystemObject
  LaurelBridge.DCF.Examples.LoggingDCF33StyleProgram

Namespace:  LaurelBridge.DCF.Examples.LoggingDCF33Style
Assembly:  LoggingDCF33Style (in LoggingDCF33Style.exe) Version: DCF34 r11538 DCF_3_4_24_20190319
Syntax

C#
public class Program

The Program type exposes the following members.

Constructors

  NameDescription
Public methodProgram
Initializes a new instance of the Program class
Top
Methods

  NameDescription
Public methodStatic memberMain
Main entry point for LoggingDCF33Style.
Top
Remarks

This example also demonstrates programmatic configuration of the log adapter defined in the DCF33StyleNLogAdapter class. The example instantiates a colored console and logs several messages to it using a variety of techniques to demonstrate logging levels and debug flags.

See the SessonLogging example for a demonstration of session logging capabilities.

Loggers in the DCF library that are associated with Inputs and Outputs are passed a DicomSessionSettings object that implements the ILogSettings interface. When a LogEvent is created, the LogLevelFlags and the LogDebugFlags (for Debug messages) are consulted early by the Logger to see if the LogEvent should be passed to the ILogAdapter.

Logger method calls get their ILogSettings in one of three ways:

  1. Passed as a non-null parameter to the logging message invocation.
  2. Acquired from thread local storage using GetThreadLogSettings.
  3. From the DefaultSessionSettings object.

This example demonstrates each of these facilities.

See Also

Reference