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

No handlers could be found for logger #50882

Closed
purpleidea mannequin opened this issue Aug 3, 2009 · 3 comments
Closed

No handlers could be found for logger #50882

purpleidea mannequin opened this issue Aug 3, 2009 · 3 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@purpleidea
Copy link
Mannequin

purpleidea mannequin commented Aug 3, 2009

BPO 6633
Nosy @vsajip

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/vsajip'
closed_at = <Date 2009-08-05.19:45:54.914>
created_at = <Date 2009-08-03.17:04:09.809>
labels = ['library']
title = 'No handlers could be found for logger'
updated_at = <Date 2009-08-05.21:07:47.390>
user = 'https://bugs.python.org/purpleidea'

bugs.python.org fields:

activity = <Date 2009-08-05.21:07:47.390>
actor = 'purpleidea'
assignee = 'vinay.sajip'
closed = True
closed_date = <Date 2009-08-05.19:45:54.914>
closer = 'vinay.sajip'
components = ['Library (Lib)']
creation = <Date 2009-08-03.17:04:09.809>
creator = 'purpleidea'
dependencies = []
files = []
hgrepos = []
issue_num = 6633
keywords = []
message_count = 3.0
messages = ['91231', '91329', '91336']
nosy_count = 2.0
nosy_names = ['vinay.sajip', 'purpleidea']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue6633'
versions = ['Python 2.5']

@purpleidea
Copy link
Mannequin Author

purpleidea mannequin commented Aug 3, 2009

I was trying to suppress the error message as shown in the title, when I
found out (by searching through the source) that there is a NullHandler
for precisely this purpose.

http://svn.python.org/view/python/trunk/Lib/logging/__init__.py?r1=66211&r2=67511

do you think that:

  1. this could be documented maybe here (
    http://docs.python.org/library/logging.html#handler-objects ) i suppose?
    and:
  2. this null handler doesn't seem to exist in:
    Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
    [GCC 4.3.2] on linux2
    is this likely to get backported to 2.5? at the moment i've just
    included the simple NullHandler class into my code.
  3. also not my business really, but should it belong in the handlers.py
    file?

thanks for all your hard work, i hope the comments are useful!

@purpleidea purpleidea mannequin added the stdlib Python modules in the Lib dir label Aug 3, 2009
@vsajip
Copy link
Member

vsajip commented Aug 5, 2009

  1. It's not appropriate to document NullHandler at the point you
    describe, as that's the API for Handlers. However, it is documented at

http://docs.python.org/library/logging.html#configuring-logging-for-a-library

I will check that NullHandler is added to documentation where the
available handler classes are listed.

  1. Unlikely to be backported to 2.5, as it's a new feature (2.5
    documentation tells how to create the class in user's own code).

  2. NullHandler was placed in the main logging package along with the
    other "elementary" handlers which are likely to be of most general use -
    the handlers.py module is intended for more specialised handlers.

@vsajip vsajip closed this as completed Aug 5, 2009
@purpleidea
Copy link
Mannequin Author

purpleidea mannequin commented Aug 5, 2009

very well,
i didn't notice the
http://docs.python.org/library/logging.html#configuring-logging-for-a-library
and i thank you for your time and efforts!

cheers,
_J

@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
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

1 participant