Skip to content

Commit

Permalink
PB-1531 Remove logging config from settings prod
Browse files Browse the repository at this point in the history
It's already done in settings base
  • Loading branch information
schtibe committed Jan 24, 2025
1 parent 43366dc commit 5b0f45c
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions app/config/settings_prod.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
import os

import yaml

from .settings_base import * # pylint: disable=wildcard-import, unused-wildcard-import

DEBUG = False


# Read configuration from file
def get_logging_config() -> dict[str, object]:
'''Read logging configuration
Read and parse the yaml logging configuration file passed in the environment variable
LOGGING_CFG and return it as dictionary
Note: LOGGING_CFG is relative to the root of the repo
'''
log_config_file = env('LOGGING_CFG', default='app/config/logging-cfg-local.yml')
if log_config_file.lower() in ['none', '0', '', 'false', 'no']:
return {}
log_config = {}
with open(BASE_DIR / log_config_file, 'rt', encoding="utf-8") as fd:
log_config = yaml.safe_load(os.path.expandvars(fd.read()))
return log_config


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.0/howto/static-files/

Expand Down

0 comments on commit 5b0f45c

Please sign in to comment.