# Setting logging level not working

**URL:** <https://discuss.ray.io/t/setting-logging-level-not-working/6957>\
**Category:** Ray Serve\
**Created:** [July 25, 2022, 6:04pm UTC](https://discuss.ray.io/t/setting-logging-level-not-working/6957 "2022-07-25T18:04:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![james811223](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/james811223/32/2604_2.png) [@james811223](https://discuss.ray.io/u/james811223)\
**Post date:** [July 25, 2022, 6:04pm UTC](https://discuss.ray.io/t/setting-logging-level-not-working/6957/1 "2022-07-25T18:04:13Z")

</div>

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

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

I’m trying to set logging level to ERROR with Ray Serve, but it’s still showing INFO logs.

```python
...
init(runtime_env=runtime_env, include_dashboard=False, ignore_reinit_error=True, logging_level=logging.ERROR)
app = FastAPI()
logger = logging.getLogger("ray.serve")
...
serve.start()

@serve.deployment(ray_actor_options={"num_gpus": 1)
@serve.ingress(app)
class cv:
    def __init__ (self):
        ...
        logger.setLevel(logging.ERROR)
        ...

cv.deploy()

```

---

<div class="post-metadata">

**Author:** ![simon-mo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/simon-mo/32/9_2.png) [@simon-mo](https://discuss.ray.io/u/simon-mo)\
**Post date:** [July 26, 2022, 9:18pm UTC](https://discuss.ray.io/t/setting-logging-level-not-working/6957/2 "2022-07-26T21:18:05Z")

</div>

Can you create a github issue? If it doesn’t work, it might be a bug in our codebase. Also how about try getting the logger from within the init method. Thanks!

---

<div class="post-metadata">

**Author:** ![james811223](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/james811223/32/2604_2.png) [@james811223](https://discuss.ray.io/u/james811223)\
**Post date:** [July 27, 2022, 1:21pm UTC](https://discuss.ray.io/t/setting-logging-level-not-working/6957/3 "2022-07-27T13:21:37Z")

</div>

Try getting the logger from within the init method doesn’t work. I created an [issue](https://github.com/ray-project/ray/issues/27089#issue-1319555907). Thanks!
