It’s entirely possible I misunderstood what you were asking for.
Can you be more explicit about where this API is?
My reading of the logging API is that:
-
logging.debug
has a parameterstack_info
where the developer can request a full stack trace in the log message. That is what I meant when I said I couldn’t see a use case whereby we would set that parameter in production code. - My reading of the
logging.LogRecord
API is that the function arguments are not available anywhere. This means they can not be included in a log format string. If you can’t tell me what I’ve missed that would be wonderful.
I’ll be open to adding a --log-format
option to the command line to give people more control over the log output but that’s not been requested before because the JSON log output option includes everything that is available in the log record.
Sorry for my inaccurate English. I meant “determine” the caller arguments by explicitly using the inspect
API. Doing that would require we write a special log handler. Again, maybe I’ve missed something an LogRecord
does have this information already and I’m failing to read the documentation.