Hi. A quick question. Looking at <https://github.c...
# flytekit
h
Hi. A quick question. Looking at https://github.com/flyteorg/flytekit/blob/master/flytekit/loggers.py, does it mean in a python task if I do
context.user_space_params.logging.warning(msg)
, I will get json log by default? Thanks.
k
Yes
h
Cool. Thanks. I guess it should be doable to customize the formatter? Thinking of stackdriver logging that requires a different json format.
y
you can try to import
ch
and override the formatter https://github.com/flyteorg/flytekit/blob/master/flytekit/loggers.py#L42
but that seems pretty hacky
h
Sorry I missed these messages. Yeah it’s pretty hacky, and it would be great if there is a way to inject the json config somewhere not in user code.
152 Views