2022-12-31 10:08:14 +03:00
|
|
|
import logging
|
|
|
|
|
2022-12-31 19:29:09 +03:00
|
|
|
# logging.getLogger('numba').setLevel(logging.WARNING)
|
2022-12-31 10:08:14 +03:00
|
|
|
|
2023-03-10 19:56:10 +03:00
|
|
|
|
2023-01-14 13:27:18 +03:00
|
|
|
class UvicornSuppressFilter(logging.Filter):
|
|
|
|
def filter(self, record):
|
|
|
|
return False
|
2023-01-14 00:44:30 +03:00
|
|
|
|
2023-03-10 19:56:10 +03:00
|
|
|
|
2023-04-28 07:49:40 +03:00
|
|
|
def setup_loggers():
|
|
|
|
# logger = logging.getLogger("uvicorn.error")
|
|
|
|
# logger.addFilter(UvicornSuppressFilter())
|
2022-12-31 10:08:14 +03:00
|
|
|
|
2023-04-28 07:49:40 +03:00
|
|
|
logger = logging.getLogger("fairseq.tasks.hubert_pretraining")
|
|
|
|
logger.addFilter(UvicornSuppressFilter())
|
2023-03-10 19:56:10 +03:00
|
|
|
|
2023-04-28 07:49:40 +03:00
|
|
|
logger = logging.getLogger("fairseq.models.hubert.hubert")
|
|
|
|
logger.addFilter(UvicornSuppressFilter())
|
2023-03-10 22:19:59 +03:00
|
|
|
|
2023-04-28 07:49:40 +03:00
|
|
|
logger = logging.getLogger("fairseq.tasks.text_to_speech")
|
|
|
|
logger.addFilter(UvicornSuppressFilter())
|
2023-03-10 22:30:44 +03:00
|
|
|
|
2023-04-28 07:49:40 +03:00
|
|
|
logger = logging.getLogger("numba.core.ssa")
|
|
|
|
logger.addFilter(UvicornSuppressFilter())
|
2023-03-10 22:30:44 +03:00
|
|
|
|
2023-04-28 07:49:40 +03:00
|
|
|
logger = logging.getLogger("numba.core.interpreter")
|
|
|
|
logger.addFilter(UvicornSuppressFilter())
|
2023-03-10 22:19:59 +03:00
|
|
|
|
2023-04-28 07:49:40 +03:00
|
|
|
logger = logging.getLogger("numba.core.byteflow")
|
|
|
|
logger.addFilter(UvicornSuppressFilter())
|
2023-03-10 22:19:59 +03:00
|
|
|
|
2023-04-28 07:49:40 +03:00
|
|
|
# logger.propagate = False
|
2023-03-10 22:19:59 +03:00
|
|
|
|
2023-04-28 07:49:40 +03:00
|
|
|
logger = logging.getLogger("multipart.multipart")
|
|
|
|
logger.propagate = False
|
2023-03-10 22:19:59 +03:00
|
|
|
|
2023-04-28 07:49:40 +03:00
|
|
|
logging.getLogger("asyncio").setLevel(logging.WARNING)
|