Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in multiprocessing logging docs #48550

Closed
dursobr mannequin opened this issue Nov 11, 2008 · 2 comments
Closed

error in multiprocessing logging docs #48550

dursobr mannequin opened this issue Nov 11, 2008 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@dursobr
Copy link
Mannequin

dursobr mannequin commented Nov 11, 2008

BPO 4300
Nosy @birkenfeld, @benjaminp

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2008-11-11.21:56:23.496>
created_at = <Date 2008-11-11.19:04:01.272>
labels = ['docs']
title = 'error in multiprocessing logging docs'
updated_at = <Date 2008-11-11.21:56:23.473>
user = 'https://bugs.python.org/dursobr'

bugs.python.org fields:

activity = <Date 2008-11-11.21:56:23.473>
actor = 'benjamin.peterson'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-11-11.21:56:23.496>
closer = 'benjamin.peterson'
components = ['Documentation']
creation = <Date 2008-11-11.19:04:01.272>
creator = 'dursobr'
dependencies = []
files = []
hgrepos = []
issue_num = 4300
keywords = []
message_count = 2.0
messages = ['75755', '75762']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'benjamin.peterson', 'dursobr']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue4300'
versions = ['Python 2.6']

@dursobr
Copy link
Mannequin Author

dursobr mannequin commented Nov 11, 2008

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

@dursobr dursobr mannequin assigned birkenfeld Nov 11, 2008
@dursobr dursobr mannequin added the docs Documentation in the Doc dir label Nov 11, 2008
@benjaminp
Copy link
Contributor

Thanks for the report! Fixed in r67189.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants