Closed mainrs closed 2 days ago
You need to use a dynamic format
function:
def formatter(record):
if record["extra"]:
return "{time} {message} | {extra}\n{exception}"
else:
return "{time} {message}\n{exception}"
Thank you!
My template contains
| {extra}
at the end. Is it possible to only print that part of any extra arguments are present? Right now all my logging lines without extra data end in| {}
.