aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <tim.orling@konsulko.com>2023-10-26 15:00:22 -0700
committerTim Orling <tim.orling@konsulko.com>2023-10-26 15:00:22 -0700
commitf714ebee1a0278eb7576016f6d372abe6461f637 (patch)
tree5326f5af999e6d489f1324fccd08de23d1065bb3
parent79153aec35c26be386a619636f9caeb09534eb09 (diff)
downloadbitbake-contrib-f714ebee1a0278eb7576016f6d372abe6461f637.tar.gz
toaster: log_viewer logs in BUILDDIR/toaster_logs
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
-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']