[ python-Bugs-1241006 ] Distutils does not use logging

SourceForge.net noreply at sourceforge.net
Tue Jun 6 21:20:55 CEST 2006


Bugs item #1241006, was opened at 2005-07-19 17:21
Message generated for change (Settings changed) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1241006&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Distutils
Group: Python 2.4
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Giles Antonio Radford (mewf)
Assigned to: Nobody/Anonymous (nobody)
Summary: Distutils does not use logging

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2006-06-06 19:20

Message:
Logged In: YES 
user_id=849994

This should be resolved as part of the Summer of Code
project this year.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2005-08-06 18:00

Message:
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.

----------------------------------------------------------------------

Comment By: Giles Antonio Radford (mewf)
Date: 2005-08-06 16:46

Message:
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?

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2005-08-06 12:45

Message:
Logged In: YES 
user_id=21627

Can you provide a patch?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1241006&group_id=5470


More information about the Python-bugs-list mailing list