a few docker-related fixes
This commit is contained in:
@@ -2,7 +2,8 @@ import logging.config
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
PARAMETERS_DIR = Path('src/parameters')
|
||||
LOCATION_PREFIX = Path('src')
|
||||
PARAMETERS_DIR = LOCATION_PREFIX / 'parameters'
|
||||
AMENITY_SELECTORS_PATH = PARAMETERS_DIR / 'amenity_selectors.yaml'
|
||||
LANDMARK_PARAMETERS_PATH = PARAMETERS_DIR / 'landmark_parameters.yaml'
|
||||
OPTIMIZER_PARAMETERS_PATH = PARAMETERS_DIR / 'optimizer_parameters.yaml'
|
||||
@@ -16,7 +17,7 @@ OSM_CACHE_DIR = Path(cache_dir_string)
|
||||
import logging
|
||||
import yaml
|
||||
|
||||
LOGGING_CONFIG = Path('log_config.yaml')
|
||||
LOGGING_CONFIG = LOCATION_PREFIX / 'log_config.yaml'
|
||||
config = yaml.safe_load(LOGGING_CONFIG.read_text())
|
||||
|
||||
logging.config.dictConfig(config)
|
||||
|
34
backend/src/log_config.yaml
Normal file
34
backend/src/log_config.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
version: 1
|
||||
disable_existing_loggers: False
|
||||
formatters:
|
||||
simple:
|
||||
format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||
handlers:
|
||||
console:
|
||||
class: rich.logging.RichHandler
|
||||
formatter: simple
|
||||
# access:
|
||||
# class: logging.FileHandler
|
||||
# filename: logs/access.log
|
||||
# level: INFO
|
||||
# formatter: simple
|
||||
|
||||
|
||||
|
||||
|
||||
loggers:
|
||||
uvicorn.error:
|
||||
level: INFO
|
||||
handlers:
|
||||
- console
|
||||
propagate: no
|
||||
# uvicorn.access:
|
||||
# level: INFO
|
||||
# handlers:
|
||||
# - access
|
||||
# propagate: no
|
||||
root:
|
||||
level: INFO
|
||||
handlers:
|
||||
- console
|
||||
propagate: yes
|
Reference in New Issue
Block a user