Skip to content

Commit c199e3b

Browse files
committed
output logging when BackgroundTask encounters an error
1 parent 4e13c08 commit c199e3b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/gui/background_task.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
import logging
2+
13
from PyQt6.QtCore import QThread, pyqtSignal
24

5+
logger = logging.getLogger('logsmith')
6+
37

48
class BackgroundTask(QThread):
59
success_channel = pyqtSignal(object)
@@ -28,4 +32,5 @@ def run(self):
2832
else:
2933
self.success_channel.emit(result.payload)
3034
except Exception as e:
35+
logging.error('unexpected error while executing background task', exc_info=True)
3136
self.error_channel.emit(str(e))

0 commit comments

Comments
 (0)