From 6bee352f477967b0b27591d796b75ab22352dba6 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Sun, 16 Sep 2012 16:24:36 +0200 Subject: [PATCH] Move trackback dumping to logger. --- mopidy/utils/process.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mopidy/utils/process.py b/mopidy/utils/process.py index fdeb8e8c..909fe7c1 100644 --- a/mopidy/utils/process.py +++ b/mopidy/utils/process.py @@ -85,10 +85,10 @@ class DebugThread(threading.Thread): threads = dict((t.ident, t.name) for t in threading.enumerate()) for ident, frame in sys._current_frames().items(): - if self.ident == ident: - continue - - print "## Thread: %s (%s) ##" % (threads[ident], ident) - print ''.join(traceback.format_stack(frame)) + if self.ident != ident: + stack = ''.join(traceback.format_stack(frame)) + logger.debug('Current state of %s (%s):\n%s', + threads[ident], ident, stack) + del frame self.event.clear()