Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/django_testing_ci_python_3_13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ jobs:
# Create log files
sudo mkdir -p /var/log/user_portals/cf_mybrc
sudo touch /var/log/user_portals/cf_mybrc/cf_mybrc_portal.log
sudo touch /var/log/user_portals/cf_mybrc/cf_mybrc_api.log

# Modify log file permssions to allow testing to function properly
sudo chmod 775 /var/log/user_portals/cf_mybrc
sudo chmod 666 /var/log/user_portals/cf_mybrc/cf_mybrc_portal.log
sudo chmod 666 /var/log/user_portals/cf_mybrc/cf_mybrc_api.log

# Give Apache permission to logs
sudo chown -R :www-data /var/log/user_portals/cf_mybrc
Expand Down
9 changes: 0 additions & 9 deletions bootstrap/ansible-almalinux8/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,6 @@
owner: "{{ djangooperator }}"
group: apache

- name: Create a log file for Django API logs
copy:
content: ""
force: false
dest: "{{ log_path }}/{{ api_log_file }}"
mode: 0660
owner: "{{ djangooperator }}"
group: apache

# Create the Django MEDIA_ROOT directory and subdirectories for file
# storage if required.

Expand Down
1 change: 0 additions & 1 deletion bootstrap/ansible/.env.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ DJANGO__DATABASES_DEFAULT_PORT=5432
# -----------------------------------------------------------------------------

HPCS__LOG_PATH={{ log_path }}/{{ portal_log_file }}
HPCS__API_LOG_PATH={{ log_path }}/{{ api_log_file }}
{% if stream_logs_to_stdout is defined and stream_logs_to_stdout | bool -%}
HPCS__STREAM_LOGS_TO_STDOUT=true
{%- else -%}
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/ansible/logrotate.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ log_path }}/{{ api_log_file }} {{ log_path }}/{{ portal_log_file }} {
{{ log_path }}/{{ portal_log_file }} {
weekly
rotate 8
dateext
Expand Down
1 change: 0 additions & 1 deletion bootstrap/ansible/main.copyme
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ redis_host: localhost
# TODO: For LRC, use the substring 'cf_mylrc'.
log_path: /var/log/user_portals/cf_mybrc
portal_log_file: cf_mybrc_portal.log
api_log_file: cf_mybrc_api.log

logrotate_entry_name: cf_mybrc

Expand Down
9 changes: 0 additions & 9 deletions bootstrap/ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,6 @@
owner: "{{ djangooperator }}"
group: apache

- name: Create a log file for Django API logs
copy:
content: ""
force: false
dest: "{{ log_path }}/{{ api_log_file }}"
mode: 0660
owner: "{{ djangooperator }}"
group: apache

# Create the Django MEDIA_ROOT directory and subdirectories for file
# storage if required.

Expand Down
1 change: 0 additions & 1 deletion bootstrap/development/docker/config/brc_defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ db_name: cf_brc_db

log_path: /var/log/user_portals/cf_mybrc
portal_log_file: cf_mybrc_portal.log
api_log_file: cf_mybrc_api.log
logrotate_entry_name: cf_mybrc

wsgi_conf_file_name: cf_mybrc_wsgi.conf
Expand Down
1 change: 0 additions & 1 deletion bootstrap/development/docker/config/lrc_defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ db_name: cf_lrc_db

log_path: /var/log/user_portals/cf_mylrc
portal_log_file: cf_mylrc_portal.log
api_log_file: cf_mylrc_api.log
logrotate_entry_name: cf_mylrc

wsgi_conf_file_name: cf_mylrc_wsgi.conf
Expand Down
1 change: 0 additions & 1 deletion coldfront/config/env_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
}

LOG_PATH = env('HPCS__LOG_PATH')
API_LOG_PATH = env('HPCS__API_LOG_PATH')

STREAM_LOGS_TO_STDOUT = env.bool('HPCS__STREAM_LOGS_TO_STDOUT', default=True)

Expand Down
14 changes: 1 addition & 13 deletions coldfront/config/local_settings.py.sample
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ DISPLAY_TIME_ZONE = 'America/Los_Angeles'
import os
import structlog
LOG_PATH = os.path.join('/var/log/user_portals/cf_mybrc', 'cf_mybrc_portal.log')
API_LOG_PATH = os.path.join('/var/log/user_portals/cf_mybrc', 'cf_mybrc_api.log')
_log_formatter = 'console_dev' if DEBUG else 'json'
LOGGING = {
'version': 1,
Expand Down Expand Up @@ -112,12 +111,6 @@ LOGGING = {
'filename': LOG_PATH,
'formatter': 'json',
},
'api_file': {
'level': 'INFO',
'class': 'logging.FileHandler',
'filename': API_LOG_PATH,
'formatter': 'json',
},
},
'loggers': {
'django_auth_ldap': {
Expand All @@ -130,7 +123,7 @@ LOGGING = {
'level': 'INFO',
},
'coldfront.api': {
'handlers': ['api_file'],
'handlers': ['file'],
'level': 'INFO',
'propagate': False,
},
Expand Down Expand Up @@ -513,17 +506,12 @@ EXTRA_MIDDLEWARE += EXTRA_EXTRA_MIDDLEWARE

# Update logging settings based on potentially-updated variables.
LOGGING['handlers']['file']['filename'] = LOG_PATH
LOGGING['handlers']['api_file']['filename'] = API_LOG_PATH

if STREAM_LOGS_TO_STDOUT:
LOGGING['handlers']['file'] = {
'class': 'logging.StreamHandler',
'formatter': _log_formatter,
}
LOGGING['handlers']['api_file'] = {
'class': 'logging.StreamHandler',
'formatter': _log_formatter,
}

# Update allauth settings based on potentially-updated variables.
SOCIALACCOUNT_PROVIDERS['cilogon']['APP']['client_id'] = CILOGON_APP_CLIENT_ID
Expand Down