This is mostly a refactor to use Python logging facility and pass additional variables as "extra".
Additionally, few changes in Pub (which is written in Go) to produce logs in the same format.
A new sample job in sample/python-logging-format/entrypoint.py.
Changelog
Added
Structured logging can be enabled by setting LOG_STRUCTURED environment variable to true.
This will cause Racetrack services to produce logs in a JSON format.
The default logging formatter can also be changed by jobs.
For more details, refer to the documentation of the specifc job type plugin.
Take a look at the sample/python-logging-format/entrypoint.py
to see how to configure your own logging formatter in jobs.
sample/python-logging-format/entrypoint.py
.Changelog
Added
Structured logging can be enabled by setting
LOG_STRUCTURED
environment variable totrue
. This will cause Racetrack services to produce logs in a JSON format. The default logging formatter can also be changed by jobs. For more details, refer to the documentation of the specifc job type plugin. Take a look at thesample/python-logging-format/entrypoint.py
to see how to configure your own logging formatter in jobs.