mirror of
https://github.com/tropicoo/yt-dlp-bot.git
synced 2025-03-04 02:33:06 +08:00
14 lines
390 B
Python
14 lines
390 B
Python
import logging
|
|
|
|
from api.core.config import settings
|
|
|
|
|
|
def setup_logging() -> None:
|
|
log_format = '%(asctime)s - [%(levelname)s] - [%(name)s:%(lineno)s] - %(message)s'
|
|
logging.basicConfig(
|
|
format=log_format, level=logging.getLevelName(settings.LOG_LEVEL)
|
|
)
|
|
try:
|
|
logging.getLogger('sqlalchemy.engine.Engine').handlers.pop()
|
|
except IndexError:
|
|
pass
|