Remove coloredlogs and now unused log constants

This commit is contained in:
rlaphoenix
2023-02-25 11:46:03 +00:00
parent 77c16f557c
commit 8d626822cb
4 changed files with 2 additions and 54 deletions

View File

@@ -4,15 +4,14 @@ from datetime import datetime
from pathlib import Path
import click
import coloredlogs
import urllib3
from urllib3.exceptions import InsecureRequestWarning
from devine.core import __version__
from devine.core.commands import Commands
from devine.core.config import config
from devine.core.constants import LOG_FORMAT, LOG_FORMATTER, context_settings
from devine.core.console import console
from devine.core.constants import context_settings
from devine.core.utilities import rotate_log_file
LOGGING_PATH = None
@@ -27,7 +26,6 @@ def main(version: bool, debug: bool, log_path: Path) -> None:
"""Devine—Open-Source Movie, TV, and Music Downloading Solution."""
logging.basicConfig(level=logging.DEBUG if debug else logging.INFO)
log = logging.getLogger()
coloredlogs.install(level=log.level, fmt=LOG_FORMAT, style="{")
if log_path:
global LOGGING_PATH

View File

@@ -1,9 +1,5 @@
import logging
from typing import TypeVar, Union
LOG_FORMAT = "{asctime} [{levelname[0]}] {name} : {message}" # must be '{}' style
LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
LOG_FORMATTER = logging.Formatter(LOG_FORMAT, LOG_DATE_FORMAT, "{")
DRM_SORT_MAP = ["ClearKey", "Widevine"]
LANGUAGE_MUX_MAP = {
# List of language tags that cannot be used by mkvmerge and need replacements.