madzak / python-json-logger

Json Formatter for the standard python logger
BSD 2-Clause "Simplified" License
1.7k stars 231 forks source link

Remove default 'message' field #123

Closed Voyz closed 1 year ago

Voyz commented 2 years ago

How can I avoid including message field in every log by default?

By logging a dict like:

a = {'foo': 'bar'}
logger.info(a)

I get the following output

{'message': null, 'foo': 'bar'}

How can I avoid that message field being added?