rexzhang / asgi-webdav

An asynchronous WebDAV server implementation, Support multi-provider, multi-account and permission control.
https://rexzhang.github.io/asgi-webdav/
MIT License
75 stars 14 forks source link

Pass external logging configuration #31

Closed davidbrochart closed 1 year ago

davidbrochart commented 1 year ago

Is there a way to disable logging, or at least reduce the level? I tried this but it doesn't seem to work:

config = init_config_from_obj(webdav_conf)
config.logging_level = LoggingLevel.CRITICAL
davidbrochart commented 1 year ago

Ah actually this works:

webdav_conf.update(logging_level=LoggingLevel.CRITICAL)
init_config_from_obj(webdav_conf)
davidbrochart commented 1 year ago

Actually what I'd like is to integrate asgi-webdav into a framework that already has its own logging configuration. Currently asgi-webdav duplicates all the uvicorn messages that Asphalt prints. I'm not sure how to do that.

rexzhang commented 1 year ago

Config.logging.enable == False will disable log info, now. 6c9885c56c07ff01778d60dfb1e06fa4af18ee7e

davidbrochart commented 1 year ago

Thanks!