Title: error in multiprocessing logging docs
Type: Stage:
Components: Documentation Versions: Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: benjamin.peterson, dursobr, georg.brandl
Priority: normal Keywords:

Created on 2008-11-11 19:04 by dursobr, last changed 2008-11-11 21:56 by benjamin.peterson. This issue is now closed.

Messages (2)
msg75755 - (view) Author: Brian D'Urso (dursobr) Date: 2008-11-11 19:04
the 2.6 docs for the multiprocessing module have a minor error in the
logging example which causes it to fail:

the documentation says to get the logger with
'multiprocessing.get_logger()' which works

but the example uses 'multiprocessing.getLogger()' which uses the
logging package method name and is not valid.

The full example in the docs is:

>>> import multiprocessing, logging
>>> logger = multiprocessing.getLogger()
>>> logger.setLevel(logging.INFO)
>>> logger.warning('doomed')
[WARNING/MainProcess] doomed
>>> m = multiprocessing.Manager()
[INFO/SyncManager-1] child process calling
[INFO/SyncManager-1] manager bound to '\\\\.\\pipe\\pyc-2776-0-lj0tfa'
>>> del m
[INFO/MainProcess] sending shutdown message to manager
[INFO/SyncManager-1] manager exiting with exitcode 0
msg75762 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-11-11 21:56
Thanks for the report! Fixed in r67189.
Date User Action Args
2008-11-11 21:56:23benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg75762
nosy: + benjamin.peterson
2008-11-11 19:04:01dursobrcreate