Logging

Contents

How do I make log files for analysing network problems?

Using COM version of DicomObjects

 

32 BIT Computers:

To make log files set the following registry_values: (both DWORDs)

HKEY_LOCAL_MACHINE/Software/Medical Connections/DicomObjects/Log=1
HKEY_LOCAL_MACHINE/Software/Medical Connections/DicomObjects/LogLevel=3F

Logs should then appear as D.O.xxxxx.log in C:\

If you wish them to be made elsewhere, then add this string entry also:

HKEY_LOCAL_MACHINE/Software/Medical Connections/DicomObjects/LogLocation = PathToUse


64 bit Computers (Using 32 bit Applications):

Slightly different location in the registry for 64 bit Machines

To make log files set the following registry_values: (both DWORDs)

HKEY_LOCAL_MACHINE/Software/Wow6432Node/Medical Connections/DicomObjects/Log=1
HKEY_LOCAL_MACHINE/Software/Wow6432Node/Medical Connections/DicomObjects/LogLevel=3F

Logs should then appear as D.O.xxxxx.log in C:\

If you wish them to be made elsewhere, then add this string entry also:

HKEY_LOCAL_MACHINE/Software/Wow6432Node/Medical Connections/DicomObjects/LogLocation = PathToUse

 

To set this programmatically :

Dim dg As New DicomGlobal
dg.RegWord("Log") = 1
dg.RegWord("LogLevel") = 63 (See below for supported log levels) 
dg.RegString("LogLocation") = PathToUse

 

Using .NET version of DicomObjects

There are two ways of doing this:

  • Use DicomGlobal.LogToFile method in your program. This should appear in a Form_Load or similar startup method.

e.g.

DicomGlobal.LogToFile("C:\\DicomLogs",level);
  • Use an external DicomObjects.Config file, which needs to be placed in the same folder of your executable. Click here to download the sample config file.

For more information about DicomObjects.Config file, check Config_File

Sensible level values for logging

  • 0x7 - Errors and main events only (Smallest)
  • 0x3F - Most Data (Medium)
  • 0x3FF - A full byte level log (Full log)
Relevance: