Closed twmr closed 8 months ago
This is because ffcx itself calls logging.basicConfig at import time, which it probably shouldn't.
Only the first call to logging.basicConfig has any effect.
Thx for the comment! Yes, a logging handler is added by ffcx
to the root logger at import time. My subsequent basicConfig
call has no effect.
I agree that ffcx
shouldn't setup the logging at import time.
Should we move this github issue to the ffcx project?
It can have effect if you add force=True
to your basicConfig
-call.
However, I agree that it probably shouldn't be called, and that the issue should be moved to ffcx.
How to reproduce the bug
If
dolfinx
is imported before the logging system is configured via e.g.logging.basicConfig
, then log messages are not written to stdout.Minimal Example (Python)
Output (Python)
Version
0.6.0
DOLFINx git commit
No response
Installation
No response
Additional information
No response