Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Have the ThreadedWrapperHandler use 'handle' and not 'emit' #33

Merged
merged 1 commit into from

2 participants

@JustinAzoff

Handler.handle catches exceptions while Handler.emit does not.

If a logger raises an exception when being ran under ThreadedWrapperHandler you will get a

Exception in thread Thread-1:

and the thread will die. Additionally this can likely cause memory issues as the shared queue will grow indefinitely.

@JustinAzoff JustinAzoff Have the ThreadedWrapperHandler use 'handle' and not 'emit'
Handler.handle catches exceptions while Handler.emit does not.
If a logger raises an exception when being ran under
ThreadedWrapperHandler you will get a

    Exception in thread Thread-1:

and the thread will die.  Additionally this can likely cause
memory issues as the shared queue will grow indefinitely.
98ac3b4
@brainstorm brainstorm merged commit 1179c08 into mitsuhiko:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 13, 2011
  1. @JustinAzoff

    Have the ThreadedWrapperHandler use 'handle' and not 'emit'

    JustinAzoff authored
    Handler.handle catches exceptions while Handler.emit does not.
    If a logger raises an exception when being ran under
    ThreadedWrapperHandler you will get a
    
        Exception in thread Thread-1:
    
    and the thread will die.  Additionally this can likely cause
    memory issues as the shared queue will grow indefinitely.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  logbook/queues.py
View
2  logbook/queues.py
@@ -359,7 +359,7 @@ def _target(self):
if record is self._sentinel:
self.running = False
break
- self.wrapper_handler.handler.emit(record)
+ self.wrapper_handler.handler.handle(record)
class ThreadedWrapperHandler(WrapperHandler):
Something went wrong with that request. Please try again.