diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2009-08-15 23:35:08 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2009-08-15 23:35:08 (GMT) |
commit | 5a92b13a468bcdcb133784e392322e503cd24276 (patch) | |
tree | f5610da8946dfb64428708677e1cd3d4dbc812ef | |
parent | a7471bf334036b79109858c10203d98a87ea37ee (diff) | |
download | cpython-5a92b13a468bcdcb133784e392322e503cd24276.zip cpython-5a92b13a468bcdcb133784e392322e503cd24276.tar.gz cpython-5a92b13a468bcdcb133784e392322e503cd24276.tar.bz2 |
Refined section on logging to one file from multiple processes.
-rw-r--r-- | Doc/library/logging.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 58bda37..111969c 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -1331,6 +1331,12 @@ existing processes to perform this function.) The following section documents this approach in more detail and includes a working socket receiver which can be used as a starting point for you to adapt in your own applications. +If you are using a recent version of Python which includes the +:mod:`multiprocessing` module, you can write your own handler which uses the +:class:`Lock` class from this module to serialize access to the file from +your processes. The existing :class:`FileHandler` and subclasses do not make +use of :mod:`multiprocessing` at present, though they may do so in the future. + .. _network-logging: Sending and receiving logging events across a network |