This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Distutils does not use logging
Type: Stage:
Components: Distutils Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, loewis, mewf
Priority: normal Keywords:

Created on 2005-07-19 17:21 by mewf, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg25833 - (view) Author: Giles Antonio Radford (mewf) Date: 2005-07-19 17:21
distutils.log creates its own PEP 282-like logger
class, which is fine from the distutils point of view,
but not exactly brilliant if you want to intercept the
calls using the logging facilities that have been in
python since 2.3.

Recommended fix:

If, in fact, distutils.log has to be kept compatible
with 2.1 as is claimed in the source file then
something along the lines of:

try:
    import logging
    _global_log = logging.getLogger('distutils')
except ImportError:
    #insert current Log class definition here
    _global_log = Log()
    

Also, changing the values for DEBUG, INFO, WARN, ERROR and 
FATAL to be the same as the ones in logging.py is
probably a good idea.

The distutils logger should have its own formatter that
prints out lines as the thing currently does, but this
formatter should be set within the code for setup()
rather than in the log module.
msg25834 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-08-06 12:45
Logged In: YES 
user_id=21627

Can you provide a patch?
msg25835 - (view) Author: Giles Antonio Radford (mewf) Date: 2005-08-06 16:46
Logged In: YES 
user_id=859703

Yes, though I'm offline for most of this week, I'll try and
give it a go for next weekend.

Does it need to be kept compatible with python 2.1? Or is
2.3 and above OK?
msg25836 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-08-06 18:00
Logged In: YES 
user_id=21627

It needs to stay backwards-compatible with 2.1, so you need
to fallback if logging is not available.

No need to hurry, though.
msg25837 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-06-06 19:20
Logged In: YES 
user_id=849994

This should be resolved as part of the Summer of Code
project this year.
History
Date User Action Args
2022-04-11 14:56:12adminsetgithub: 42200
2005-07-19 17:21:46mewfcreate