mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 13:38:12 +00:00
fix log
This commit is contained in:
parent
ac28a41d96
commit
29e20e302a
@ -28,16 +28,16 @@ def _log(name, mlevel, msg, *args):
|
|||||||
print(fmt % ((utime.ticks_us(), name, _leveldict[mlevel][0]) + args), file=sys.stderr)
|
print(fmt % ((utime.ticks_us(), name, _leveldict[mlevel][0]) + args), file=sys.stderr)
|
||||||
|
|
||||||
def debug(name, msg, *args):
|
def debug(name, msg, *args):
|
||||||
_log(DEBUG, msg, *args)
|
_log(name, DEBUG, msg, *args)
|
||||||
|
|
||||||
def info(name, msg, *args):
|
def info(name, msg, *args):
|
||||||
_log(INFO, msg, *args)
|
_log(name, INFO, msg, *args)
|
||||||
|
|
||||||
def warning(name, msg, *args):
|
def warning(name, msg, *args):
|
||||||
_log(WARNING, msg, *args)
|
_log(name, WARNING, msg, *args)
|
||||||
|
|
||||||
def error(name, msg, *args):
|
def error(name, msg, *args):
|
||||||
_log(ERROR, msg, *args)
|
_log(name, ERROR, msg, *args)
|
||||||
|
|
||||||
def critical(name, msg, *args):
|
def critical(name, msg, *args):
|
||||||
_log(CRITICAL, msg, *args)
|
_log(name, CRITICAL, msg, *args)
|
||||||
|
@ -46,7 +46,7 @@ def __wait_for_event(timeout_us):
|
|||||||
|
|
||||||
def __call_at(time, gen, *args):
|
def __call_at(time, gen, *args):
|
||||||
if __debug__:
|
if __debug__:
|
||||||
log.debug("Scheduling %s", (time, gen, args))
|
log.debug(__name__, 'Scheduling %s %s %s', time, gen, args)
|
||||||
|
|
||||||
if not time:
|
if not time:
|
||||||
time = utime.ticks_us()
|
time = utime.ticks_us()
|
||||||
|
Loading…
Reference in New Issue
Block a user