Logging can now be configured with either a subclass or setting of Application. This replaces the previous method of overriding a private method of RequestHandler, which was difficult to do for built-in handlers (StaticFileHandler and RedirectHandler).
…ncate(). But, per http://stackoverflow.com/questions/4330812/how-do-i-clear-a-stringio-object discussion, creating new StringIO() is cheaper.
and allows the same callback object to be reused. A set was originally used to support remove_callback(), but that method was removed in the 1.1 release.
The logging module checks to see if the value passed for exc_info is a tuple, and if so assumes it contains (type, value, traceback). A bug in python 2.5 and 2.6 causes context manager's __exit__ methods to sometimes receive a tuple instead of an exception object, which causes a nonsensical message to be logged.
_handle_request_exception is a private method, but since I've endorsed overriding it on the mailing list preserve backwards compatibility by re-raising the exception so it appears in sys.exc_info(). Closes #199.
for consistency with normal handler construction (and compatibility with the initialize() changes from a couple of commits ago). Closes #194.
…ses. This is a slight simplification and makes it easier to create further application-specific subclasses. Closes #191.
This decorator has over 5x the overhead of a hand-written class with __enter__ and __exit__ methods.
- Added error handler for _on_access_token - Modified to allow for extra returned fields in the auth call - Removed username, which seems to have been deprecated
This allows the next parameter (added by @authenticated) to be preserved. Closes #161.
Malformed requests are now logged as a single INFO line (which includes the IP address) instead of a verbose but uninformative stack trace.
In Firefox and Safari, I'm seeing k = " boundary" for multipart/form-data posts. " boundary" != "boundary", so the mime fields aren't parsed. This commit gets rid of the leading space.