2

I have microservice written in Quart python. I would like to stop logging on to stdout. So far I have tried app.logger.disabled = True and Flask alike import logging log = logging.getLogger('werkzeug') log.setLevel(logging.ERROR)

Havent achieved goals yet.

aCoopML
  • 21
  • 2

2 Answers2

1

In the snippet given the issue is that Quart has no werkzeug logger, it has quart.app and quart.serving so the likely equivalent is to do logging.getLogger('quart.serving').setLevel(logging.ERROR)

Note, this question was asked as a Quart issue, and I am the Quart author.

pgjones
  • 6,044
  • 1
  • 14
  • 12
0

The following worked for me, with Quart 0.18.4:

import logging
logging.getLogger('hypercorn.access').disabled = True

(I expected logging.getLogger('hypercorn.access').setLevel(logging.ERROR) to work too, but that strangely didn't do anything.)

sebas
  • 1,283
  • 1
  • 12
  • 16