aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/toaster/toastermain/logs.py6
-rw-r--r--lib/toaster/toastermain/settings.py5
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/toaster/toastermain/logs.py b/lib/toaster/toastermain/logs.py
index 5a296bc3f..9d392fb4b 100644
--- a/lib/toaster/toastermain/logs.py
+++ b/lib/toaster/toastermain/logs.py
@@ -109,7 +109,7 @@ LOGGING_SETTINGS = {
'file_django': {
'level': 'INFO',
'class': 'logging.handlers.TimedRotatingFileHandler',
- 'filename': BUILDDIR / 'toaster_django.log',
+ 'filename': BUILDDIR / 'toaster_logs/toaster_django.log',
'when': 'D', # interval type
'interval': 1, # defaults to 1
'backupCount': 10, # how many files to keep
@@ -118,7 +118,7 @@ LOGGING_SETTINGS = {
'file_api': {
'level': 'INFO',
'class': 'logging.handlers.TimedRotatingFileHandler',
- 'filename': BUILDDIR / 'toaster_api.log',
+ 'filename': BUILDDIR / 'toaster_logs/toaster_api.log',
'when': 'D',
'interval': 1,
'backupCount': 10,
@@ -127,7 +127,7 @@ LOGGING_SETTINGS = {
'file_toaster': {
'level': 'INFO',
'class': 'logging.handlers.TimedRotatingFileHandler',
- 'filename': BUILDDIR / 'toaster.log',
+ 'filename': BUILDDIR / 'toaster_logs/toaster.log',
'when': 'D',
'interval': 1,
'backupCount': 10,
diff --git a/lib/toaster/toastermain/settings.py b/lib/toaster/toastermain/settings.py
index c65f4b630..20e86fb0b 100644
--- a/lib/toaster/toastermain/settings.py
+++ b/lib/toaster/toastermain/settings.py
@@ -322,7 +322,10 @@ BUILDDIR = os.environ.get("BUILDDIR")
# LOG VIEWER
# https://pypi.org/project/django-log-viewer/
LOG_VIEWER_FILES_PATTERN = '*.log*'
-LOG_VIEWER_FILES_DIR = BUILDDIR
+LOG_VIEWER_FILES_DIR = os.path.join(os.environ.get('BUILDDIR', '/tmp'), 'toaster_logs')
+print("******************")
+print(LOG_VIEWER_FILES_DIR)
+print("******************")
LOG_VIEWER_PAGE_LENGTH = 25 # total log lines per-page
LOG_VIEWER_MAX_READ_LINES = 100000 # total log lines will be read
LOG_VIEWER_PATTERNS = ['INFO', 'DEBUG', 'WARNING', 'ERROR', 'CRITICAL']