feat(shared): return log level and filepath

This commit is contained in:
jo 2022-02-20 15:56:18 +01:00 committed by Kyle Robbertze
parent 045fdc8d96
commit 31cf8361be
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import sys
from copy import deepcopy
from pathlib import Path
from typing import TYPE_CHECKING, NamedTuple, Optional
from typing import TYPE_CHECKING, NamedTuple, Optional, Tuple
from loguru import logger
@ -53,7 +53,7 @@ def setup_logger(
level: LogLevel,
filepath: Optional[Path] = None,
serialize: bool = False,
) -> None:
) -> Tuple[LogLevel, Optional[Path]]:
"""
Configure the logger and return the computed log level.
@ -81,6 +81,8 @@ def setup_logger(
logger.configure(handlers=handlers)
return level, filepath
_empty_logger = deepcopy(logger)