Make lib.App logging more customizable #55
1 changed files with 1 additions and 1 deletions
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>
commit
5d2e4fc03c
|
|
@ -240,7 +240,7 @@ def log( # export
|
|||
|
||||
msg += _log_prefix
|
||||
|
||||
if not len(msg):
|
||||
if not len(msg) and not len(margs):
|
||||
return
|
||||
|
||||
if len(margs):
|
||||
|
|
|
|||
Loading…
Reference in a new issue