mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-27 19:29:11 -04:00
update logging
This commit is contained in:
@@ -8,7 +8,7 @@ import usaButton %} {% block meta %}
|
||||
{% block beforeContent %}{% endblock %}
|
||||
|
||||
<main id="main-content" role="main">
|
||||
{% if counts.live_service_count == 'N/A' %}
|
||||
{% if counts %}
|
||||
<div class="usa-alert usa-alert--info usa-alert--slim" aria-label="Site alert,,,,">
|
||||
<div class="grid-container padding-x-0">
|
||||
<div class="usa-alert__body">
|
||||
|
||||
@@ -15,6 +15,7 @@ class ColorFormatter(logging.Formatter):
|
||||
'DEBUG': '\033[94m',
|
||||
'WARNING': '\033[93m',
|
||||
'ERROR': '\033[91m',
|
||||
'CRITICAL': '\033[95m',
|
||||
}
|
||||
RESET = '\033[0m'
|
||||
|
||||
@@ -93,7 +94,6 @@ def init_app(app):
|
||||
|
||||
def get_handlers(app):
|
||||
handlers = []
|
||||
color_formatter = ColorFormatter(LOG_FORMAT, TIME_FORMAT)
|
||||
json_formatter = JSONFormatter(LOG_FORMAT, TIME_FORMAT)
|
||||
|
||||
stream_handler = logging.StreamHandler(sys.stdout)
|
||||
@@ -106,6 +106,8 @@ def get_handlers(app):
|
||||
return not ("GET /static/" in msg and " 200 " in msg)
|
||||
|
||||
logging.getLogger("werkzeug").addFilter(is_200_static_log)
|
||||
color_formatter = ColorFormatter(LOG_FORMAT, TIME_FORMAT)
|
||||
|
||||
handlers.append(configure_handler(stream_handler, app, color_formatter))
|
||||
|
||||
return handlers
|
||||
|
||||
Reference in New Issue
Block a user