Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #85818
| References | <24fc6e1c-1db3-41e0-84df-18b0ca5a8c69@googlegroups.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2015-02-18 13:15 -0700 |
| Subject | Re: Logging with Custom Levels not working |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.18834.1424290566.18130.python-list@python.org> (permalink) |
On Wed, Feb 18, 2015 at 6:49 AM, Didymus <lynto28@gmail.com> wrote: > def perror(self, message, *args, **kws): > """ Performance Error Message Level """ > # Yes, logger takes its '*args' as 'args'. > self._log(PERROR_NUM, message, args, **kws) > > logging.Logger.perror = perror I think you need to call self.log, not self._log. The _log method appears to assume that the level check has already been performed. You really shouldn't be calling it directly anyway, as the leading _ is an indication that the method is not part of the public API.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Logging with Custom Levels not working Didymus <lynto28@gmail.com> - 2015-02-18 05:49 -0800
Re: Logging with Custom Levels not working Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-18 13:15 -0700
Re: Logging with Custom Levels not working Didymus <lynto28@gmail.com> - 2015-02-19 10:16 -0800
Re: Logging with Custom Levels not working Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-20 02:16 -0700
Re: Logging with Custom Levels not working Didymus <lynto28@gmail.com> - 2015-02-20 05:29 -0800
csiph-web