Open JokerQyou opened 6 years ago
@JokerQyou Logbook uses new-style formatting:
logger.debug("Message is {}", "message")
The code you attached is using logging redirect, which is mostly an interoperability feature to make sure built-in logging
logs will make their way into logbook. If you use Logbook, your own code should emit logs using logbook loggers and not logging
ones...
@vmalloc I think the question was also about the available formatting attributes (?) If so I opened a similar issue (https://github.com/getlogbook/logbook/issues/276)
I read through the documentation site but did not find a single line of code mentioning about string format. So I assumed the basic concepts are the same. But when I go ahead and try it, things does not work as expected:
It seems like logbook does not support string format placeholders
%s
,%d
, etc., while the stdliblogging
does. It's this an intended behavior? If so, would it make sense to document this difference so people coming fromlogging
could adjust their expectation?