lib.log.log(): Fix early return without flags set
When position, prio, and date are all absent from the log flags, the msg variable is empty. The early return 'if not len(msg): return' would then skip printing the actual message in margs. Fix by checking both msg and margs before returning. This ensures messages are still printed even when no prefix flags are set. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
b2fb37a668
commit
5d2e4fc03c
1 changed files with 1 additions and 1 deletions
|
|
@ -240,7 +240,7 @@ def log( # export
|
||||||
|
|
||||||
msg += _log_prefix
|
msg += _log_prefix
|
||||||
|
|
||||||
if not len(msg):
|
if not len(msg) and not len(margs):
|
||||||
return
|
return
|
||||||
|
|
||||||
if len(margs):
|
if len(margs):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue