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


Namespace:  LaurelBridge.DCF.Examples.SessionLogging
Assembly:  SessionLogging (in SessionLogging.exe) Version: DCF34 r11295 DCF_3_4_22

public class Program

The Program type exposes the following members.


Public methodProgram
Initializes a new instance of the Program class

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 notepad for each selection.

See Also