snu-quiqcl / qiwis

QuIqcl Widget Integration Software
MIT License
5 stars 2 forks source link

Use `logging` #179

Closed kangz12345 closed 10 months ago

kangz12345 commented 1 year ago

Feature you want to implement

Currently, the example apps and the qiwis system just print out the log messages to the console or broadcast them to the log channel. However, this seems neither scalable nor modular since it does not provide any extendable interface, e.g., logging into files, log filtering, log levels, etc. Therefore, I think we should use the Python's logging module for logging and implement a Handler to send the logs to the logger app.

How the feature is implemented

This issue will be broken into 3 sub-issues:

  1. Qiwis central logging, without actually printing out anything. (When we test it, we import qiwis and get its logger. We will create a dedicated branch for this.) (See #180)
  2. Test if the logger app can show all the logs made by Qiwis. (See #181)
  3. Change all the apps to use logging to log. (See #182)

Additional context

An image from logging flow Logging flow

BECATRUE commented 1 year ago

Did you intend that this issue is in the Log Viewer project? The project was created in the Iquip repo, but if you are okay, never mind!

kangz12345 commented 1 year ago

Did you intend that this issue is in the Log Viewer project?

Yes, because this is required to implement the logger in iquip!