LaurelBridge.DCF.Examples.LoggingDCF33StyleProgram
Namespace: LaurelBridge.DCF.Examples.LoggingDCF33Style
Assembly: LoggingDCF33Style (in LoggingDCF33Style.exe) Version: DCF34 r11538 DCF_3_4_24_20190319
public class Program
The Program type exposes the following members.
Name | Description | |
---|---|---|
Program | Initializes a new instance of the Program class |
Name | Description | |
---|---|---|
Main |
Main entry point for LoggingDCF33Style.
|
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:
- Passed as a non-null parameter to the logging message invocation.
- Acquired from thread local storage using GetThreadLogSettings.
- From the DefaultSessionSettings object.
This example demonstrates each of these facilities.