[issue16778] Logger.findCaller needs to be smarter

2012-12-25 Thread Glynn Clements
New submission from Glynn Clements: The current behaviour of logging.Logger.findCaller() makes it awkward to add custom logging interfaces. E.g. suppose that you define a custom logging level (NOTICE) then add a notice() function (analogous to logging.info() etc), the resulting LogRecord

[issue16778] Logger.findCaller needs to be smarter

2012-12-26 Thread Glynn Clements
Glynn Clements added the comment: Subclassing findCaller() is likely to be a bit hairy for the average user, as it deals with some fairly arcane aspects of Python internals. As for mechanism, maybe allow functions/methods to be registered with the logging module, which would store a

[issue6373] SystemError in encoder

2009-06-29 Thread Glynn Clements
New submission from Glynn Clements : Test case: > "\udce4\udceb\udcef\udcf6\udcfc".encode("iso-8859-1", "surrogateescape") Traceback (most recent call last): File "", line 1, in SystemError: Objects/bytesobject.c:3182: bad argument to intern