Logging issue in Ray

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

  • High: It blocks me to complete my task.

Ray clear my application’s existing logging config and redefine one from ray/init.py. It cause a huge problem in my end, no logs persisted as our config. How could I resolve this?

Ray version : 2.8.1


@BalajiSelvaraj10 can you try the latest Ray?

https://github.com/ray-project/ray/pull/36306 might fix the issue.

Hi @jjyao

Mentioned patch was released in Ray 2.6.2

I’m currently using ray 2.8.1. So should I downgrade to older version?

TIA :slightly_smiling_face:

@jjyao can you check this at your free time., It blocks me.

Hi @jjyao ., Can you check this


@BalajiSelvaraj10 Sorry for the late reply.

You can upgrade to the latest Ray version. I did the following test and it worked

Python 3.8.18 (default, Sep 11 2023, 08:17:16)
[Clang 14.0.6 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> logging.basicConfig(format="%(asctime)s %(message)s")
>>> import ray
>>> ray.init()
2024-04-16 22:16:44,816	INFO worker.py:1567 -- Connecting to existing Ray cluster at address:
2024-04-16 22:16:44,824	INFO worker.py:1743 -- Connected to Ray cluster. View the dashboard at
RayContext(dashboard_url='', python_version='3.8.18', ray_version='3.0.0.dev0', ray_commit='{{RAY_COMMIT_SHA}}')
>>> logger = logging.getLogger(__name__)
>>> logger.error("Hello")
2024-04-16 22:17:16,094 Hello