Re: Extra fields for logging

2009-12-26 Thread Joan Miller
On 26 dic, 04:34, Steven D'Aprano wrote: > On Fri, 25 Dec 2009 12:07:20 -0800, Joan Miller wrote: > > On 25 dic, 13:24, Steven D'Aprano > cybersource.com.au> wrote: > >> On Thu, 24 Dec 2009 05:06:48 -0800, Joan Miller wrote: > >> > I'm trying to add some extra fields to logging, I'm following thi

Re: Extra fields for logging

2009-12-25 Thread Steven D'Aprano
On Fri, 25 Dec 2009 12:07:20 -0800, Joan Miller wrote: > On 25 dic, 13:24, Steven D'Aprano cybersource.com.au> wrote: >> On Thu, 24 Dec 2009 05:06:48 -0800, Joan Miller wrote: >> > I'm trying to add some extra fields to logging, I'm following this >> > information [1] but it faills in my case. >>

Re: Extra fields for logging

2009-12-25 Thread Joan Miller
On 25 dic, 13:24, Steven D'Aprano wrote: > On Thu, 24 Dec 2009 05:06:48 -0800, Joan Miller wrote: > > I'm trying to add some extra fields to logging, I'm following this > > information [1] but it faills in my case. > [...] > > I get => KeyError: 'host' > > Please post the entire traceback you get.

Re: Extra fields for logging

2009-12-25 Thread Steven D'Aprano
On Thu, 24 Dec 2009 05:06:48 -0800, Joan Miller wrote: > I'm trying to add some extra fields to logging, I'm following this > information [1] but it faills in my case. [...] > I get => KeyError: 'host' Please post the entire traceback you get. -- Steven -- http://mail.python.org/mailman/list

Extra fields for logging

2009-12-24 Thread Joan Miller
I'm trying to add some extra fields to logging, I'm following this information [1] but it faills in my case. # module logger.py import logging class ExtraInfo(object): def __getitem__(self, name): if name == 'host': result = 'foo' def __iter__(self