[issue33510] [logging] add JSON log formatter

Vinay Sajip report at bugs.python.org
Tue May 15 03:47:29 EDT 2018


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> The solution recommended in the logging cookbook does not do the same thing as I have proposed.

Perhaps not, but it appears to adequately address your first point:

> Many logging aggregation and indexing systems require that log data must be written in an easy-to-parse format such as JSON.


> The logging cookbook solution is that the user must explicitly write JSON data into the message line of each call to the logging code.

No, it just illustrates one simple way it could be done.

> P.S. Here is a blog posting on why it is useful to log in pure JSON

I'm already aware of situations where machine-parseable logs are valuable, thanks.

There's nothing stopping you from publishing any handlers/formatters you think are generally useful on PyPI, and publicising them so that people who want to use them can do so. There's no reason for them to be in the stdlib, as PyPI offers a better home for more specialised functionality than the stdlib.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33510>
_______________________________________


More information about the Python-bugs-list mailing list