Changes by Éric Araujo mer...@netwok.org:
--
resolution: - out of date
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14273
___
anatoly techtonik added the comment:
More specifically, you need to copy NullHandler code if you want to run it with
Python 2.x 2.7
--
nosy: +techtonik
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14273
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
It's been a while since I looked at this issue, so it would be helpful if you
summarised exactly what sort of events are logged at INFO or DEBUG level, and
why adding a handler early doesn't work. You said in msg155614 that you would
try
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
One more thing (referring to the opening comment by Tarek): if you add a
NullHandler to the top-level logger as recommended in the library docs for
libraries, you won't get the No handlers could be found message.
--
Éric Araujo mer...@netwok.org added the comment:
DEBUG should only be set for messages of interest to developers/support
staff/system admins,
and which might confuse end users.
The thing is that all logging messages from distutils2 should be sent to
handlers, and client code such as pysetup
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
IIUC the logger should be set to DEBUG, otherwise even if e.g. pip wants to
get
INFO messages it won’t see them. Is that right?
Well, you could set the level to INFO to get INFO and higher messages. DEBUG
should only be set for
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
I cannot reproduce this, and in fact couldn't find anywhere in packaging in the
default branch where a distutils2 logger is set up. I used grep to look for
getLogger.*(distutils2|__name__), could some other logic be in use to
construct
Éric Araujo mer...@netwok.org added the comment:
We didn’t give enough info, sorry. This bug is not reproducible with
packaging, it only shows when using the distutils2 repository with Python 2.5,
2.6 or 3.1. I think it’s related to the absence of built-in handler of last
resort.
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
Yes, the whole package only uses one logger, and we don’t want to stop
messages:
the application (pysetup, pip, etc.) must be able to set the level. I’ll
remove
the code that sets a level on the logger and write a test to make
Éric Araujo mer...@netwok.org added the comment:
I think you might mean sets a level on the handler - the logger should
still have the level set
IIUC the logger should be set to DEBUG, otherwise even if e.g. pip wants to get
INFO messages it won’t see them. Is that right?
--
Éric Araujo mer...@netwok.org added the comment:
I’ve seen that too when running “python -m packaging.run”, but I don’t
understand why the behavior is different when running pysetup vs. ./pysetup vs.
python -m: all of these run the same code.
--
nosy: +vinay.sajip
title: handler not
11 matches
Mail list logo