pydicom.config.debug

pydicom.config.debug(debug_on: bool = True, default_handler: bool = True) None[source]

Turn on/off debugging of DICOM file reading and writing.

When debugging is on, file location and details about the elements read at that location are logged to the ‘pydicom’ logger using Python’s logging module.

Parameters
  • debug_on (bool, optional) – If True (default) then turn on debugging, False to turn off.

  • default_handler (bool, optional) – If True (default) then use logging.StreamHandler as the handler for log messages.