[PEAK] [setuptools] Logging

Nikolaus Rath Nikolaus at rath.org
Thu Apr 15 15:36:53 EDT 2010


On 04/15/2010 03:01 PM, P.J. Eby wrote:
> At 02:54 PM 4/15/2010 -0400, Nikolaus Rath wrote:
>> On 04/15/2010 02:30 PM, P.J. Eby wrote:
>> > At 11:27 AM 4/15/2010 -0400, Nikolaus Rath wrote:
>> >> Hello,
>> >>
>> >> I would like to be able to specify a log level when running my test
>> >> suite. What is the best way to do this?
>> >>
>> >> I was thinking about either adding an additional '--log-level'
>> option to
>> >> the existing 'test' command or adding the option globally for the
>> entire
>> >> setup.py. But I didn't find any information about how to do any of
>> these
>> >> two.
>> >
>> > Have you tried -v and -q?  The test command already supports these, as
>> > does the entire setup.py.
>>
>> No, I haven't. I want to initialize the "logging" module with its 5 or
>> so logging levels, and these options just control the verbosity of
>> setup.py und unittest, right?
> 
> No.  Distutils has its own, independent logging system that is in no way
> related, except for some superficial API similarities.  Likewise,
> unittest (or at least the versions I'm familiar with) does not use the
> logging module either.

But that's exactly what I'm saying. I want to initialize the logging
module, and the -q and -v options of setup.py do not help at all, since
they only deal with distutil's and unittest's logging.

Therefore I want to add a *new* option (either to setup.py or to the
"test" command) that initializes the logging module. My question is: how
do I do that?

Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


More information about the PEAK mailing list