I have a log.py
module, that is used in at least two other modules (server.py
and device.py
).
It has these globals:
Python logging is thread safe:
Is Python's logging module thread safe?
http://docs.python.org/2/library/logging.html#thread-safety
So you have no problem in the Python (library) code.
The routine that you call from multiple threads (WriteLog
) does not write to any shared state. So you have no problem in your code.
So you are OK.