There is no reason for logging this specific message in multiple lines, so we can change this easily.
Optionally replacing the newlines with some other character sequence would be no problem either, that could be a useful feature in general.
However, for your specific need, I think the best solution would be to create a separate audit log file where you would log all the relevant information and only the relevant information. You could achieve that by connecting your custom logging function to the CTK DICOM retrieve class. We can add any signals to CTK or Slicer that are needed for this.