Configuring root logger in task/actor

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

In the documentation Logging — Ray 1.12.1 the root logger is being configured
I am wondering if it is ok to change the root logger configuration for each actor / task as it affects the entire process including ray infra?
Its not just changing the logging level but can be adding/removing handlers/filters.

Hey @shiranbi , it may affect Ray’s internal logging if you change the root logger, but that in general should be fine (no different from changing the system log config)— nothing will break.

To be sure you aren’t changing the Ray logging, you could create a child logger and configure that explicitly.

Just as I planned to do (creating a child logger)
my issue is more with the example in the documentation than anything else.
it seems like the example suggests changing the root logger is the correct way to go (I wanted to check by posting this question that it isn’t necessary true and I wasn’t missing anything)
Maybe for log level it isn’t that harmful but I think the example should reflect the preferred method to configure the logger in all cases