Skip to content

Commit

Permalink
Changed the logging time format to utc
Browse files Browse the repository at this point in the history
UTC works better for ELK. Also changed the application name in the log
config to the template name.
  • Loading branch information
ltshb committed Sep 23, 2020
1 parent 4c860c6 commit 421e5fc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 5 additions & 4 deletions logging-cfg-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ loggers:
filters:
application:
(): logging_utilities.filters.ConstAttribute
application: service-qrcode
application: template-service-flask
isotime:
(): logging_utilities.filters.TimeAttribute
isotime: True
isotime: False
utc_isotime: True
flask:
(): logging_utilities.filters.flask_attribute.FlaskRequestAttribute
attributes:
Expand All @@ -46,15 +47,15 @@ formatters:
add_always_extra: True
filter_attributes:
- application
- isotime
- utc_isotime
- flask_request_url
- flask_request_method
- flask_request_headers
- flask_request_json
- flask_request_remote_addr
remove_empty: True
fmt:
time: isotime
time: utc_isotime
level: levelname
app: application
logger: name
Expand Down
9 changes: 5 additions & 4 deletions logging-cfg-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ loggers:
filters:
application:
(): logging_utilities.filters.ConstAttribute
application: service-qrcode
application: template-service-flask
isotime:
(): logging_utilities.filters.TimeAttribute
isotime: True
isotime: False
utc_isotime: True
flask:
(): logging_utilities.filters.flask_attribute.FlaskRequestAttribute
attributes:
Expand All @@ -46,15 +47,15 @@ formatters:
add_always_extra: True
filter_attributes:
- application
- isotime
- utc_isotime
- flask_request_url
- flask_request_method
- flask_request_headers
- flask_request_json
- flask_request_remote_addr
remove_empty: True
fmt:
time: isotime
time: utc_isotime
level: levelname
app: application
logger: name
Expand Down
9 changes: 5 additions & 4 deletions logging-cfg-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ loggers:
filters:
application:
(): logging_utilities.filters.ConstAttribute
application: service-qrcode
application: template-service-flask
isotime:
(): logging_utilities.filters.TimeAttribute
isotime: True
isotime: False
utc_isotime: True
flask:
(): logging_utilities.filters.flask_attribute.FlaskRequestAttribute
attributes:
Expand All @@ -46,15 +47,15 @@ formatters:
add_always_extra: True
filter_attributes:
- application
- isotime
- utc_isotime
- flask_request_url
- flask_request_method
- flask_request_headers
- flask_request_json
- flask_request_remote_addr
remove_empty: True
fmt:
time: isotime
time: utc_isotime
level: levelname
app: application
logger: name
Expand Down

0 comments on commit 421e5fc

Please sign in to comment.