mozilla-services / python-dockerflow

A Python package to implement tools and helpers for Mozilla Dockerflow
https://python-dockerflow.readthedocs.io
Mozilla Public License 2.0
38 stars 21 forks source link

Add MozlogHandler that integrates renamed formatter #112

Closed grahamalama closed 4 months ago

grahamalama commented 4 months ago

This PR adds a new MozlogHandler class that sets sensible defaults (subclasses StreamHandler, sets the output to stdout by default) and integrates a Mozlog formatter directly into the handler.

It also renames JsonLogFormatter to MozlogFormatter, since JsonLogFormatter was too generic of a name.

This PR is intended to be fully backwards compatible, though the JsonLogFormatter is marked with a deprecation warning.