diff --git a/src/lib/log.py b/src/lib/log.py index eea455f0e..5d80fc6e7 100644 --- a/src/lib/log.py +++ b/src/lib/log.py @@ -28,16 +28,16 @@ def _log(name, mlevel, msg, *args): print(fmt % ((utime.ticks_us(), name, _leveldict[mlevel][0]) + args), file=sys.stderr) def debug(name, msg, *args): - _log(DEBUG, msg, *args) + _log(name, DEBUG, msg, *args) def info(name, msg, *args): - _log(INFO, msg, *args) + _log(name, INFO, msg, *args) def warning(name, msg, *args): - _log(WARNING, msg, *args) + _log(name, WARNING, msg, *args) def error(name, msg, *args): - _log(ERROR, msg, *args) + _log(name, ERROR, msg, *args) def critical(name, msg, *args): - _log(CRITICAL, msg, *args) + _log(name, CRITICAL, msg, *args) diff --git a/src/trezor/loop.py b/src/trezor/loop.py index 22dd88427..8f620d3b9 100644 --- a/src/trezor/loop.py +++ b/src/trezor/loop.py @@ -46,7 +46,7 @@ def __wait_for_event(timeout_us): def __call_at(time, gen, *args): if __debug__: - log.debug("Scheduling %s", (time, gen, args)) + log.debug(__name__, 'Scheduling %s %s %s', time, gen, args) if not time: time = utime.ticks_us()