Kaynağa Gözat

report exception with globals.log

Rodja Trappe 2 yıl önce
ebeveyn
işleme
8a20dcfdfb
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      nicegui/functions/timer.py

+ 1 - 1
nicegui/functions/timer.py

@@ -58,7 +58,7 @@ class Timer:
                 except asyncio.CancelledError:
                 except asyncio.CancelledError:
                     break
                     break
                 except:
                 except:
-                    traceback.print_exc()
+                    globals.log.exception('Exception in timer callback')
                     await asyncio.sleep(self.interval)
                     await asyncio.sleep(self.interval)
         self.cleanup()
         self.cleanup()