I have a use case where multiple processes will log to same log file. I have implemented socket based logging as described here https://docs.python.org/3/howto/logging-cookbook.