Details
Description
import logging logger = logging.getLogger(__name__) def main(): app = QApplication(sys.argv) window = QLabel('Window from label') window.show() logger.info("Logging is already configured?") app.exec() if __name__ == "__main__": main()
This code by itself shouldn't print anything to the console. However it seems that PySide6 configures python logging module.
This doesn't happen in PySide2.
Python 3.8 Qt 6.2.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 9.3.0) logger.getEffectiveLevel()= 20 Enabled 50 Enabled 40 Enabled 30 Enabled 20 INFO:__main__:Logging is already configured?
Python 3.8 Qt 5.15.4 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1 20160406 (Red Hat 5.3.1-6)) logger.getEffectiveLevel()= 30 Enabled 50 Enabled 40 Enabled 30
Attachments
Issue Links
- is duplicated by
-
PYSIDE-1622 logging to file not possible with PySide 6.1.1+
- Closed
-
PYSIDE-1644 Importing PySide6 adds extraneous handlers to Python logging module
- Closed