Skip to content

Commit

Permalink
Improve logging configuration (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturo-seijas authored May 27, 2024
1 parent 1c1944f commit 8dd8938
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions indico_rock/etc/logging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ root:

loggers:
indico:
handlers: [indico]
handlers: [indico, email]
celery:
handlers: [celery, stderr]
handlers: [celery, email, stderr]

handlers:
indico:
Expand All @@ -54,12 +54,20 @@ handlers:
stderr:
class: logging.StreamHandler
formatter: default
email:
class: indico.core.logger.FormattedSubjectSMTPHandler
formatter: email
level: ERROR

formatters:
default:
format: '%(asctime)s %(levelname)-7s %(request_id)s %(user_id)-6s %(name)-25s %(message)s'
simple:
format: '%(asctime)s %(levelname)-7s %(name)-25s %(message)s'
email:
append_request_info: true
format: "%(asctime)s %(request_id)s %(user_id)-6s %(name)s - %(levelname)s %(filename)s:%(lineno)d -- %(message)s\n\n"


filters:
indico:
Expand Down

0 comments on commit 8dd8938

Please sign in to comment.