feat: replace loguru with logging

This commit is contained in:
jo 2023-02-26 01:27:00 +01:00 committed by Kyle Robbertze
parent cced09f1ac
commit c6940db289
34 changed files with 138 additions and 245 deletions

View file

@ -1,15 +1,16 @@
import logging
from pathlib import Path
from subprocess import CalledProcessError, check_output, run
from time import sleep
from typing import Any, Literal, Optional, Tuple
from loguru import logger
from ..models import MessageFormatKind
from ..utils import quote
from ..version import parse_liquidsoap_version
from ._connection import LiquidsoapConnection
logger = logging.getLogger(__name__)
class LiquidsoapClientError(Exception):
"""

View file

@ -1,9 +1,10 @@
import logging
from pathlib import Path
from socket import AF_UNIX, SOCK_STREAM, create_connection, socket
from threading import Lock
from typing import Optional
from loguru import logger
logger = logging.getLogger(__name__)
class InvalidConnection(Exception):
@ -61,7 +62,7 @@ class LiquidsoapConnection:
self.close()
def connect(self):
logger.trace("trying to acquire lock")
logger.debug("trying to acquire lock")
# pylint: disable=consider-using-with
self._lock.acquire()
logger.debug(f"connecting to {self.address()}")