mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
logs docker folder fixed
This commit is contained in:
@@ -14,6 +14,7 @@ FRONT_LIBRARY_PATH: str = "/assets/romm/library"
|
||||
ROMM_USER_CONFIG_PATH: str = f"{ROMM_BASE_PATH}/config.yml"
|
||||
SQLITE_DB_BASE_PATH: str = f"{ROMM_BASE_PATH}/database"
|
||||
RESOURCES_BASE_PATH: str = f"{ROMM_BASE_PATH}/resources"
|
||||
LOGS_BASE_PATH: str = f"{ROMM_BASE_PATH}/logs"
|
||||
HIGH_PRIO_STRUCTURE_PATH: str = f"{LIBRARY_BASE_PATH}/roms"
|
||||
|
||||
# DEFAULT RESOURCES
|
||||
|
||||
@@ -4,14 +4,14 @@ import sys
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
from config import LOGS_BASE_PATH
|
||||
from logger.stdout_formatter import StdoutFormatter
|
||||
from logger.file_formatter import FileFormatter
|
||||
|
||||
# Create logs folder if not exists
|
||||
logs_path = f"{os.getenv('ROMM_BASE_PATH')}/logs"
|
||||
Path(logs_path).mkdir(parents=True, exist_ok=True)
|
||||
Path(LOGS_BASE_PATH).mkdir(parents=True, exist_ok=True)
|
||||
now = datetime.now()
|
||||
logs_file = f"{logs_path}/{now.strftime('%Y%m%d_%H%M%S')}.log"
|
||||
logs_file = f"{LOGS_BASE_PATH}/{now.strftime('%Y%m%d_%H%M%S')}.log"
|
||||
|
||||
# Get logger
|
||||
log = logging.getLogger("romm")
|
||||
|
||||
Reference in New Issue
Block a user