-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS-1015 - Logging utility, config defaults and initialisation added #18
Conversation
harryyo
commented
Jun 15, 2022
•
edited
Loading
edited
- Logging utility added
- Colour coded text logs to console in development
- Json logs in other environments
- Gunicorn support added
- Manifests for dev and test updated to use gunicorn rather than Flask run
… updates to support service running with gunicorn. Dev config updated to set FSD_LOG_LEVEL to debug
Some values are coming through as
We should either fix these or remove them. |
…imezone log time added and maded consistent across gunicorn and application logs, gunicorn config script location refactored
|
||
First set the FLASK_ENV environment you wish to test eg: | ||
|
||
export FLASK_ENV=dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im wondering if this should be stated outside of the 'Run with Gunicorn' section as it applies to running in Flask also
@@ -0,0 +1,365 @@ | |||
from __future__ import absolute_import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this another candidate for our shared utils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 (We should extract this and move to the utils library ASAP)
def now(self): | ||
return datetime.datetime.now( | ||
tz=pytz.timezone("Europe/London") | ||
).strftime("%d-%b-%y %H:%M:%S") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is unused now so can be safely deleted?