Re: Wish: Allow all log Handlers to accept the level argument

2012-05-29 Thread Vinay Sajip
Fayaz Yusuf Khan gmail.com> writes: > > ***TRIVIAL ISSUE***, but this has been irking me for a while now. > The main logging.Handler class' __init__ accepts a level argument while none > of its children do. The poor minions seem to be stuck with the setLevel > method which considerably lengthe

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Cameron Simpson
On 24May2012 12:48, Jean-Michel Pichavant wrote: | Peter Otten wrote: | > Jean-Michel Pichavant wrote: | >> Fayaz Yusuf Khan wrote: | >>> Jean-Michel Pichavant wrote: | Meanwhile you can shorten the code this way: | root.addHandler(FileHandler('debug.log')) | root.handlers[-1].setLe

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Peter Otten
Jean-Michel Pichavant wrote: > Peter Otten wrote: >> Jean-Michel Pichavant wrote: >> >> >>> Fayaz Yusuf Khan wrote: >>> Jean-Michel Pichavant wrote: > Meanwhile you can shorten the code this way: > > root.addHandler(FileHandler('debug.log')) > root.

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Jean-Michel Pichavant
Peter Otten wrote: Jean-Michel Pichavant wrote: Fayaz Yusuf Khan wrote: Jean-Michel Pichavant wrote: Meanwhile you can shorten the code this way: root.addHandler(FileHandler('debug.log')) root.handlers[-1].setLevel(DEBUG) Eh? Readability was the aim.

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Peter Otten
Jean-Michel Pichavant wrote: > Fayaz Yusuf Khan wrote: >> Jean-Michel Pichavant wrote: >> >>> Meanwhile you can shorten the code this way: >>> >>> root.addHandler(FileHandler('debug.log')) >>> root.handlers[-1].setLevel(DEBUG) >>> >>> >> Eh? Readability was the aim. >> > I fail to see h

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Jean-Michel Pichavant
Fayaz Yusuf Khan wrote: Jean-Michel Pichavant wrote: Meanwhile you can shorten the code this way: root.addHandler(FileHandler('debug.log')) root.handlers[-1].setLevel(DEBUG) Eh? Readability was the aim. I fail to see how it's not readable, code is short and no magic is involved pr

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Peter Otten
Fayaz Yusuf Khan wrote: > ***TRIVIAL ISSUE***, but this has been irking me for a while now. > The main logging.Handler class' __init__ accepts a level argument while > none of its children do. The poor minions seem to be stuck with the > setLevel method which considerably lengthens the code. > >

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-23 Thread Fayaz Yusuf Khan
Jean-Michel Pichavant wrote: > Meanwhile you can shorten the code this way: > > root.addHandler(FileHandler('debug.log')) > root.handlers[-1].setLevel(DEBUG) > Eh? Readability was the aim. -- Fayaz Yusuf Khan Cloud architect, Dexetra SS, India fayaz.yusuf.khan_AT_gmail_DOT_com, fayaz_AT_dexetra_

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-22 Thread Jean-Michel Pichavant
Fayaz Yusuf Khan wrote: ***TRIVIAL ISSUE***, but this has been irking me for a while now. The main logging.Handler class' __init__ accepts a level argument while none of its children do. The poor minions seem to be stuck with the setLevel method which considerably lengthens the code. In short