microscope-cockpit / cockpit

Cockpit is a microscope graphical user interface. It is a flexible and easy to extend platform aimed at life scientists using bespoke microscopes.
https://microscope-cockpit.org
GNU General Public License v3.0
35 stars 26 forks source link

logging records in the logging window (and stdout on the command line) #894

Open carandraug opened 1 month ago

carandraug commented 1 month ago

There are two things that would help (at least me) during debugging which are related:

  1. have stderr and stdout in the command line (at the moment cockpit hijacks those to the logging window);
  2. start using the logging module with appropriate levels instead of print statements (so we can logging.debug around).

So I would like to replace the current logging window with some sort of event window for the logging records and replace all print statements we have with the appropriate logging functions for their level. I'm worried about unhandled exceptions that currently end up on stderr so I guess we should somehow hijack stderr to get them and make logging records out of them.