Collecting DLAPI Driver Logs in MaxIm DL
This guide will instruct you on the general use of DLAPI logging features accessible from MaxIm DL. The DLAPI log must be enabled on a per-instance basis, which means that enabling driver logging in MaxIm DL will not enable logging in other applications (as of this writing). To enable logging in MaxIm DL, navigate to the Camera Control window, and click the “Setup” button of the camera you’ll be using your DLImaging camera with.
When the “Setup Camera” dialog appears, ensure “DL Imaging” is selected in the “Camera Model” dropdown (follow the camera setup guide in your camera’s user manual if it isn’t), and choose a debug logging severity threshold in the “Debug Logging” dropdown. 
There are several debug logging severity thresholds available to you:
  • “Off” is the default logging threshold, which disables all logging in the driver. We advise turning logging off for maximum throughput in production applications.
  • “Regular” captures INFO and higher severity messages (typically command headers and high-level actions)
  • “Debug” captures DEBUG and higher severity messages (typically command message bodies)
  • “Verbose” captures DEBUG VERBOSE and higher severity messages for non-polling commands (typically internal metrics and diagnostics for anything but GetCameraStatus)
  • “Verbose+” captures DEBUG VERBOSE+, which is the same as Verbose mode, but also capturing polling messages.
  • “Raw I/O” captures the application layer packets being transmitted to and from the camera

In most cases, “Debug” level logging is sufficient to diagnose most problems (especially related to camera hangs where the camera becomes unresponsive, even after reconnection attempts). Verbose is often used to diagnose throughput issues, and Verbose+ is used when we need to know what state the camera is reporting in compared to the state the calling application thinks it’s in. “Raw I/O” is guaranteed to capture all input, and is recommended if a support technician asks for your logs.

n.b. logs are not compressed, and Verbose+ will output a lot of data very quickly. It’s recommended you not use logging in a production environment, especially if you want to achieve maximum throughput.

Log settings persist across instances of MaxIm DL, so you will need to manually turn logging off when you’re done with it by setting the Debug logging level to “Off”.

Click “OK” once you’ve selected your logging level, and connect to the camera. Log files will be written to “%APPDATA%\Diffraction Limited\DLAPI\logs” and the file name format follows this structure: yyyymmdd[ii].log where yyyy is the year, mm is the month, dd is the day, and (optionally) ii is the index for log rollover (when a log file reaches maximum file size). For example, the first log captured on January 2nd, 2021 would be in file 20210102.log, and when that file reaches the size restrictions set by the logger, it will create a new file 2021010201.log.

Format

Log entries have the following format:
yyyy-mm-dd HH:MM:SS.US (TZ) [SEVERITY] MESSAGE

Where:
  • yyyy-mm-dd is the log message’s datestamp, in-process at the time of capture
  • HH:MM:SS.US is the log message’s timestamp down to the microsecond, in-process at the time of capture
  •  (TZ) will always be UTC+0000, as we write all logs in the UTC timezone.
  • [SEVERITY] is the severity level of the message, these include:
  • FATAL for messages captured in error handlers resulting in abnormal program termination
  • ERROR for messages captured in error handlers resulting in termination of subroutines
  • WARN for messages captured in error handers resulting in unexpected/non-terminal errors
  • INFO for messages posted to the log intended to inform the user of basic operational steps
  • DEBUG  for messages posted to the log intended to assist the user/developers in understanding the context of the application
  • DEBUG VERBOSE for messages posted to the log deemed non-essential
  • DEBUG VERBOSE+ for messages posted to the log intended for high-volume polling messages
  • MESSAGE contains the body of the message

e.g. A typical log file will look like this:
2021-04-30 01:58:42.832755 (UTC+0000) [INFO] ------DLAPI Logging Session Started------
2021-04-30 01:58:43.296431 (UTC+0000) [INFO] Querying USB cameras
2021-04-30 01:58:43.296535 (UTC+0000) [INFO] Querying USB3 cameras
2021-04-30 01:58:43.535662 (UTC+0000) [INFO] Sending request: GetCameraInfo | Expected Message Length: 20
2021-04-30 01:58:43.535799 (UTC+0000) [DEBUG] GetCameraInfo No Data
2021-04-30 01:58:43.550702 (UTC+0000) [DEBUG VERBOSE] Write Request: GetCameraInfo. Execution Time: 0 ms
2021-04-30 01:58:43.582268 (UTC+0000) [INFO] Receiving response: GetCameraInfo | Expected Message Length: 20
2021-04-30 01:58:43.582589 (UTC+0000) [DEBUG] GetCameraInfo Response Data | ModelNumber: Invalid Camera Model | Serial Number: 418709627 | Firmware Revision: 6 | Wifi FIrmware Revision: 65535 | Sensor Count: 1
2021-04-30 01:58:43.587581 (UTC+0000) [DEBUG VERBOSE] GetCameraInfo: Head Read Time: 0 ms