<#320 Add a lightweight JSON formatter> Pull reque...
# flyte-github
a
#320 Add a lightweight JSON formatter Pull request opened by wild-endeavor At the request of users who prefer structured log output, this adds an optional json log formatter. The formatting is just a simple function for now - let's start with this and if it becomes necessary we can pull in an external library. To use json logging set
LOG_FORMAT=json
when you run it. Also the
log_format_from_env
function was never used, now we use it. Also propagate via environment variable to the Run downstream actions. ## To use From the CLI, either: flyte --log-format json ... or LOG_FORMAT=json flyte ... Programmatically, flyte.with_runcontext(log_format="json") flyteorg/flyte-sdk