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

2012-05-29 Thread Vinay Sajip
Fayaz Yusuf Khan fayaz.yusuf.khan at 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

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. In

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

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 how it's not readable, code

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: 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)

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

2012-05-24 Thread Cameron Simpson
On 24May2012 12:48, Jean-Michel Pichavant jeanmic...@sequans.com 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')) |

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,

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