[issue4300] error in multiprocessing logging docs

Brian D'Urso report at bugs.python.org
Tue Nov 11 20:04:02 CET 2008


New submission from Brian D'Urso <dursobr at pitt.edu>:

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 self.run()
[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

----------
assignee: georg.brandl
components: Documentation
messages: 75755
nosy: dursobr, georg.brandl
severity: normal
status: open
title: error in multiprocessing logging docs
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4300>
_______________________________________


More information about the Python-bugs-list mailing list