Prevent remote worker STDOUT log to add the name/pid decorator

How severe does this issue affect your experience of using Ray?

  • Low: It annoys or frustrates me for a moment.

My issue
My software uses logging.getLogger(__name__).warning to log information to stdout.

My output is in JSON, and I grab it from kubernetes logging ELK stack (filebeat->ES).

Log example
{ “error_type”: 1, “message”: “…” }

My issue is that if I try to log from a remote function, I get this decorator:
(remote_function_name pid=560) { “error_type”: 2, “message”: “…” }

And because of this, my ELK stack is not able to parse this JSON… Any way to disable the worker STDOUT decorator?

1 Like

Hi @jaimehrubiks, thank you for posting!

@sangcho Do you know if it’s possible to remove the task function name and PID prefix from these logs?

No. There’s no way to remove this currently.

@jaimehrubiks can you create an issue to our Github to support this?

Any update on this? The fact that the ray logs cannot be output as proper JSON is quite a problem when searching through our logs in GCP.

Hey @simenandresen! Unfortunately not yet - can you cut a GH feature request so we can add this to our backlog for next Sprint planning?

Sure @Sam_Chan , created an issue now.

1 Like