python-json-logger icon indicating copy to clipboard operation
python-json-logger copied to clipboard

How can I make warnings being JSON formatted?

Open MartinThoma opened this issue 5 years ago • 1 comments

I still see this in my logs:

flask_sqlalchemy/__init__.py:834: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.

I guess this is not a log, but a warning. Can those also be json formatted?

MartinThoma avatar Dec 07 '20 01:12 MartinThoma

Try logging.captureWarnings(True).

janbuchar avatar Dec 15 '20 11:12 janbuchar