Browse Source

report exception with globals.log

Rodja Trappe 2 years ago
parent
commit
8a20dcfdfb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      nicegui/functions/timer.py

+ 1 - 1
nicegui/functions/timer.py

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