Skip to content

Commit

Permalink
[PPS] Fix ze merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
pritamps committed Oct 27, 2020
2 parents 078cf04 + 86cda8e commit 58c5eb5
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .ebextensions/logging.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
commands:
01_create_file:
command: touch /var/log/all.log
02_change_permissions:
command: chmod g+s /var/log/all.log
03_change_owner:
command: chown webapp:webapp /var/log/all.log
2 changes: 1 addition & 1 deletion .github/workflows/deploy_to_eb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Build and Deploy Django to EB
on:
push:
branches:
- releeaase
- releeeease

jobs:
build:
Expand Down
Binary file modified ivideo/__pycache__/settings.cpython-38.pyc
Binary file not shown.
Binary file modified ivideo/__pycache__/views.cpython-38.pyc
Binary file not shown.
44 changes: 41 additions & 3 deletions ivideo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"""

import os
import logging

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Expand Down Expand Up @@ -55,6 +56,7 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'request_logging.middleware.LoggingMiddleware'
]

ROOT_URLCONF = 'ivideo.urls'
Expand All @@ -77,9 +79,6 @@
},
]

WSGI_APPLICATION = 'ivideo.wsgi.application'


# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases

Expand All @@ -94,6 +93,7 @@
'PORT': os.environ['RDS_PORT'],
}
}
LOGGER_FILE = "/var/log/all.log"
else:
DATABASES = {
'default': {
Expand All @@ -105,6 +105,44 @@
'PORT': '',
}
}
LOGGER_FILE = os.path.join(BASE_DIR, 'logs', 'all.log')

REQUEST_LOGGING_DATA_LOG_LEVEL = logging.DEBUG

LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': LOGGER_FILE,
'formatter': 'verbose'
},
},
'formatters': {
'verbose': {
'format': '{levelname} {asctime} {module} {process:d} {thread:d} {message}',
'style': '{',
},
'simple': {
'format': '{levelname} {message}',
'style': '{',
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'DEBUG',
'propagate': True,
'formatter': 'verbose'
}
},
}

WSGI_APPLICATION = 'ivideo.wsgi.application'




# Password validation
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ chardet==3.0.4
decorator==4.4.2
Django==3.1.1
django-cors-headers==3.5.0
django-request-logging==0.7.2
djangorestframework==3.11.1
future==0.18.2
google-auth==1.21.2
Expand Down
Binary file modified utils/__pycache__/avanti_s3.cpython-38.pyc
Binary file not shown.

0 comments on commit 58c5eb5

Please sign in to comment.