🔧 fix(manager.py): change logger.warn to logger.warning for consistency and clarity
🔧 fix(logger.py): change log_file parameter type annotation to Optional[Path] to indicate that it is an optional argument
This commit is contained in:
parent
7e336bbee6
commit
28b487dc33
2 changed files with 3 additions and 2 deletions
|
|
@ -89,7 +89,7 @@ class DatabaseManager(Service):
|
|||
|
||||
for table in legacy_tables:
|
||||
if table in inspector.get_table_names():
|
||||
logger.warn(f"Legacy table exists: {table}")
|
||||
logger.warning(f"Legacy table exists: {table}")
|
||||
|
||||
return True
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
from typing import Optional
|
||||
from loguru import logger
|
||||
from pathlib import Path
|
||||
from rich.logging import RichHandler
|
||||
|
||||
|
||||
def configure(log_level: str = "DEBUG", log_file: Path = None):
|
||||
def configure(log_level: str = "DEBUG", log_file: Optional[Path] = None):
|
||||
log_format = "<green>{time:HH:mm:ss}</green> - <level>{level: <8}</level> - <level>{message}</level>"
|
||||
logger.remove() # Remove default handlers
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue