Skip to content

Commit

Permalink
Merge pull request #3198 from raft-tech/log-file-hotfix
Browse files Browse the repository at this point in the history
Deploy Hotfix: Log File Path
  • Loading branch information
elipe17 authored Sep 23, 2024
2 parents 3ac1dcd + 33d4fcb commit 38cbbd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tdrs-backend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ services:
- web
- celery-exporter
- postgres-exporter

promtail:
restart: always
image: grafana/promtail:3.0.1
Expand All @@ -105,7 +105,7 @@ services:
- ~/tdp-logs/nginx:/var/log/nginx
- logs:/logs
command: -config.file=/etc/promtail/config.yml

loki:
restart: always
image: grafana/loki:3.0.1
Expand Down Expand Up @@ -176,7 +176,7 @@ services:
- ELASTICSEARCH_LOG_INDEX_SLOW_LEVEL
volumes:
- .:/tdpapp
- logs:/logs
- logs:/tdpapp
image: tdp
build: .
command: >
Expand Down
7 changes: 5 additions & 2 deletions tdrs-backend/tdpservice/settings/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Define settings for all environments."""

import logging
import logging.handlers
import os
from distutils.util import strtobool
from os.path import join
Expand Down Expand Up @@ -234,9 +235,11 @@ class Common(Configuration):
"formatter": "color",
},
"file": {
"class": "logging.FileHandler",
"class": "logging.handlers.RotatingFileHandler",
"formatter": "verbose",
"filename": '/logs/django.log',
"filename": "django.log",
"maxBytes": 1024*1024*10, # 10 MiB
"backupCount": 5,
}
},
"loggers": {
Expand Down

0 comments on commit 38cbbd8

Please sign in to comment.