SINTEF / pyopia

Python Ocean Particle Image Analysis
https://pyopia.readthedocs.io
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

Logging handling is not multiprocess safe #331

Open nepstad opened 3 weeks ago

nepstad commented 3 weeks ago

Current PyOPIA implementation of logging to a single file is not guaranteed to work with multiprocessing, which may lead to log file corruption. If this problem shows up in practice, it can be fixed by implementing a log queue.

See: https://docs.python.org/3/howto/logging-cookbook.html#logging-to-a-single-file-from-multiple-processes