Bogdanp / dramatiq

A fast and reliable background task processing library for Python 3.
https://dramatiq.io
GNU Lesser General Public License v3.0
4.37k stars 313 forks source link

Logging fromating for the whole dramatiq #608

Open EgorZamotaev opened 10 months ago

EgorZamotaev commented 10 months ago

Feature request

Is it possible to add single point of editing logs format or is there any?

Any time I run dramatiq from cli it has preset formatting in LOGFORMAT variable. Is it possible to add an argument specifying the format?

z0z0r4 commented 5 months ago

I'm sure that we need this feature!

obscurebyron commented 1 month ago

I'm also on board - I need the logs in JSON format for easier handling by our logging analysis tools.

FinnLidbetter commented 1 month ago

This was asked and answered in #205

You can already customise the logging yourself. See https://docs.python.org/3/howto/logging-cookbook.html for some guidance on how to do this. You may need to run dramatiq with the --skip-logging option to avoid dramatiq calling logging.basicConfig(...)