This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DPM 202 asim formatter logging (#893)
* Use ASIM formatter for logging on production environments * Upgrade Python version in Docker
- Loading branch information
1 parent
2a1ee3b
commit 04a85fd
Showing
7 changed files
with
65 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.8 | ||
FROM python:3.12 | ||
|
||
RUN mkdir /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,36 @@ | ||
from app.settings.common import * | ||
|
||
ROOT_URLCONF = 'app.testfixtureapi_urls' | ||
|
||
# For local/E2E tests use "plain" logging (read non ASIM formatted) | ||
LOGGING = { | ||
'version': 1, | ||
'disable_existing_loggers': False, | ||
'formatters': { | ||
'console': { | ||
'format': '[%(asctime)s] [%(levelname)-4s] %(name)-8s: %(message)s', | ||
'datefmt': '%d-%m-%Y %H:%M:%S' | ||
}, | ||
'file': { | ||
'format': '%(asctime)s %(name)-12s %(levelname)-8s %(message)s' | ||
} | ||
}, | ||
'handlers': { | ||
'console': { | ||
'class': 'logging.StreamHandler', | ||
'formatter': 'console' | ||
}, | ||
'file': { | ||
'level': 'DEBUG' if env.bool('DEBUG') else 'INFO', | ||
'class': 'logging.FileHandler', | ||
'formatter': 'file', | ||
'filename': '/tmp/debug.log' | ||
} | ||
}, | ||
'loggers': { | ||
'': { | ||
'level': 'INFO', | ||
'handlers': ['console', 'file'] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
python-3.8.18 | ||
python-3.12.0 |