# How to disable the INFO log?

**URL:** <https://discuss.ray.io/t/how-to-disable-the-info-log/11619>\
**Category:** Uncategorized\
**Created:** [July 31, 2023, 5:43am UTC](https://discuss.ray.io/t/how-to-disable-the-info-log/11619 "2023-07-31T05:43:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xinchengzelin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/xinchengzelin/32/3352_2.png) [@Xinchengzelin](https://discuss.ray.io/u/Xinchengzelin)\
**Post date:** [July 31, 2023, 5:43am UTC](https://discuss.ray.io/t/how-to-disable-the-info-log/11619/1 "2023-07-31T05:43:31Z")

</div>

I don’t want this log display in stdout:

```auto
INFO train_loop_utils.py:617 -- Data type <class 'int'> doesn't support being moved to device.

```

So I add this code:

```auto
    level = logging.WARNING
    logger = logging.getLogger("ray")
    logger.setLevel(level)
    stream_handler = logging.StreamHandler(sys.stdout)
    stream_handler.setLevel(level)
    logger.addHandler(stream_handler)

```

I test add this code before or after `ray.init()` , neither of them works.

I also tested `ray.init(logging_level="warning")`, which didn’t work either.

---

<div class="post-metadata">

**Author:** ![Jules\_Damji](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/jules_damji/32/4058_2.png) [@Jules\_Damji](https://discuss.ray.io/u/Jules_Damji)\
**Post date:** [July 31, 2023, 6:11pm UTC](https://discuss.ray.io/t/how-to-disable-the-info-log/11619/2 "2023-07-31T18:11:34Z")

</div>

@Xinchengzelin Yes, we printout a lot of INFO messages.

cc: @Chen_Shen @chengsu Is there anyway to suppress and adhere to specified logging levels?

---

<div class="post-metadata">

**Author:** ![Abhi\_Sharma](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/abhi_sharma/32/2033_2.png) [@Abhi\_Sharma](https://discuss.ray.io/u/Abhi_Sharma)\
**Post date:** [September 6, 2023, 1:35pm UTC](https://discuss.ray.io/t/how-to-disable-the-info-log/11619/3 "2023-09-06T13:35:19Z")

</div>

@Jules_Damji  
Ray v2.6.3, Ray is creating hundreds of files under /tmp/ray/session\_latest/logs/  
I would like to understand how do I control the Event stats log printed by ray. Also I could see lot of noise in the logs due to RAY\_LOG(INFO).

Mainly `worker-*.err, worker-*.out and python-core-worker-*.logs.`  
How do I completely disable these logs ? and also stop ray from creating so many worker log files
