LAUREL BRIDGE

Program Class

DICOM Connectivity Framework V3.4
Demonstrate session based logging and configuring a rotating log, works by creating a separate log file for each association.
Inheritance Hierarchy

SystemObject
  LaurelBridge.DCFExamples.SessionLoggingProgram

Namespace:  LaurelBridge.DCFExamples.SessionLogging
Assembly:  SessionLogging (in SessionLogging.exe) Version: DCF34 r13043 DCF_3_4_56_20220408 NetFramework
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
Remarks

In this example, the session based logging configuration is embedded in the SessionLogging app config. This is where nlog specific parameters are configured, such as the log message layout and the file target destination. See the NLog documentation for more information about configuring the logger.

The File target located in the SessionLogging's app config configures the rotating logger, including items such as the log directory and the name used for each log file. As currently configured and stated earlier, each association will log to its own unique filename based on its session id. The default session logs to a file named using the current processes name; In this scenario, the default log file is named SessionLogger.log.

At the conclusion of the run, the example will interactively ask the user what log files they would like to view, and run the pager for each selection.

See Also

Reference