在telethon库中使用quart服务器时遇到问题,但无法处理该错误。尝试打开调试模式,但显示Warning: The config debughas no affect when using serve warnings.warn("The configdebug has no affect when using serve", Warning)
下面是我的代码:
quart_cfg = hypercorn.Config()
quart_cfg.bind = ["0.0.0.0:8000"]
quart_cfg.debug = True
app = Quart(__name__)
...
async def main():
await hypercorn.asyncio.serve(app,quart_cfg)
if __name__ == '__main__':
client.loop.run_until_complete(main())如何从quart服务器查看日志?也许我可以使用其他东西,而不是serve函数?也找不到任何文档..
发布于 2020-08-05 03:38:20
通过将loop.set_debug(debug)设置为,可以实现与调试标志相同的效果,
quart_cfg = hypercorn.Config()
quart_cfg.bind = ["0.0.0.0:8000"]
app = Quart(__name__)
...
async def main():
await hypercorn.asyncio.serve(app,quart_cfg)
if __name__ == '__main__':
client.loop.set_debug(True)
client.loop.run_until_complete(main())https://stackoverflow.com/questions/63252042
复制相似问题