Dockerify pro-salute #10

Merged
mravi merged 17 commits from pro-salute into master 2024-06-02 04:11:39 +00:00
Showing only changes of commit 1af8fe3767 - Show all commits

View file

@ -1,6 +1,8 @@
import logging
import os import os
import dj_database_url import dj_database_url
from logging.handlers import RotatingFileHandler
from .base import * from .base import *
# Do not set SECRET_KEY, Postgres or LDAP password or any other sensitive data here. # Do not set SECRET_KEY, Postgres or LDAP password or any other sensitive data here.
@ -194,7 +196,7 @@ if 'LOG_DIR' in env:
# Public Health Schweiz log # Public Health Schweiz log
LOGGING['handlers']['publichealth_file'] = { LOGGING['handlers']['publichealth_file'] = {
'level': 'INFO', 'level': 'INFO',
'class': 'cloghandler.ConcurrentRotatingFileHandler', 'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(env['LOG_DIR'], 'publichealth.log'), 'filename': os.path.join(env['LOG_DIR'], 'publichealth.log'),
'maxBytes': 5242880, # 5MB 'maxBytes': 5242880, # 5MB
'backupCount': 5 'backupCount': 5
@ -204,7 +206,7 @@ if 'LOG_DIR' in env:
# Wagtail log # Wagtail log
LOGGING['handlers']['wagtail_file'] = { LOGGING['handlers']['wagtail_file'] = {
'level': 'WARNING', 'level': 'WARNING',
'class': 'cloghandler.ConcurrentRotatingFileHandler', 'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(env['LOG_DIR'], 'wagtail.log'), 'filename': os.path.join(env['LOG_DIR'], 'wagtail.log'),
'maxBytes': 5242880, # 5MB 'maxBytes': 5242880, # 5MB
'backupCount': 5 'backupCount': 5
@ -214,7 +216,7 @@ if 'LOG_DIR' in env:
# Error log # Error log
LOGGING['handlers']['errors_file'] = { LOGGING['handlers']['errors_file'] = {
'level': 'ERROR', 'level': 'ERROR',
'class': 'cloghandler.ConcurrentRotatingFileHandler', 'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(env['LOG_DIR'], 'error.log'), 'filename': os.path.join(env['LOG_DIR'], 'error.log'),
'maxBytes': 5242880, # 5MB 'maxBytes': 5242880, # 5MB
'backupCount': 5 'backupCount': 5