[stdlib-sig] logging

Tarek Ziadé ziade.tarek at gmail.com
Fri Sep 18 10:54:00 CEST 2009


On Fri, Sep 18, 2009 at 10:43 AM, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
> Antoine Pitrou <solipsis at ...> writes:
>
>
>> Pylons uses it too.
>>
>> While logging may not look extremely pretty, I have yet to see another
>> logging library that has a pretty *and* powerful API. Applications /
>> libraries which reinvent their own logging API usually end up with
>> something which is both less powerful and *not* prettier (see
>> twisted.log for an example).
>>
>
> Thanks. If you had the time to write your ideal, "pretty" API - hypothetically,
> say, to wrap logging so you wouldn't use the underlying power - what would this
> API look like? I'm open to ideas from all of you.

I think logging is fine, but it misses a few pythonic functions on the
top of it to work with.

Right now, if you want to set up a logging output on a file or on
stdout with some options,
you have to write 5 or 6 lines of code.

These 5/6 lines could probably be put in a function in the logging module,
and be used with a few arguments. This function would return a logger
ready to be used.

Once a logger is created, logging is dead simple to use.

If you think it's a good idea I can try to work on a proposal for this
function signature.


>
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>



-- 
Tarek Ziadé | http://ziade.org | オープンソースはすごい!


More information about the stdlib-sig mailing list