On Fri, Sep 18, 2009 at 4:54 AM, Tarek Ziadé <ziade.ta...@gmail.com> wrote: > On Fri, Sep 18, 2009 at 10:43 AM, Vinay Sajip <vinay_sa...@yahoo.co.uk> wrote: >> Antoine Pitrou <solip...@...> 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.
That would be exactly my complaint. It feels like I'm writing Java instead of Python. :-) FWIW, logging has been quite flexible for my needs. Just getting it all configured is a bit of work. > 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. That would definitely be an improvement! Now back to lurk mode... -John _______________________________________________ stdlib-sig mailing list stdlib-sig@python.org http://mail.python.org/mailman/listinfo/stdlib-sig