-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve logging with Google Cloud Logs
The primary purpose here is to improve logging to GCP by changing the logging formatter from plaintext to json. The python logging config is now unified under logging.ini for both the flask application and gunicorn. Other changes are listed here: * Limits everret config sources to ENV only to avoid confusion * Removes sso-dashboard logger in favor of the root logger * Log Levels set to INFO unless SSO-DASHBOARD_DEBUG is set True * Adds a flask handler for uncaught Exceptions
- Loading branch information
Showing
15 changed files
with
103 additions
and
100 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
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
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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[loggers] | ||
keys=root,gunicorn.error,gunicorn.access,flask_app,werkzeug | ||
|
||
[handlers] | ||
keys=console | ||
|
||
[formatters] | ||
keys=json | ||
|
||
[logger_root] | ||
level=INFO | ||
handlers=console | ||
disable_existing_loggers=False | ||
|
||
[logger_gunicorn.error] | ||
level=INFO | ||
qualname=gunicorn.error | ||
propagate=0 | ||
handlers=console | ||
|
||
[logger_gunicorn.access] | ||
level=INFO | ||
qualname=gunicorn.access | ||
propagate=0 | ||
handlers=console | ||
|
||
[logger_flask_app] | ||
level=INFO | ||
qualname=flask_app | ||
propagate=0 | ||
handlers=console | ||
|
||
[logger_werkzeug] | ||
level=INFO | ||
qualname=werkzeug | ||
propagate=0 | ||
handlers=console | ||
|
||
[handler_console] | ||
class=logging.StreamHandler | ||
formatter=json | ||
args=(sys.stderr,) | ||
|
||
[formatter_json] | ||
format={"time": "%(asctime)s", "level": "%(levelname)s", "process_id": %(process)d, "message": "%(message)s", "name": "%(filename)s:%(name)s:%(funcName)s:%(lineno)s"} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.