Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

Commit

Permalink
Add levelname back to Papertrail logging for error messages to send a…
Browse files Browse the repository at this point in the history
…lerts
  • Loading branch information
Armen Zambrano G committed Jun 30, 2016
1 parent 2896d9b commit 16fe33a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pulse_actions/utils/log_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def setup_logging(logging_level):
console = logging.StreamHandler()
console.setLevel(logging_level)
# No need to track asctime as Papertrail logs times
formatter = logging.Formatter('%(name)s\t %(message)s')
# Keep levelname for error() messages to alert
formatter = logging.Formatter('%(name)s\t %(levelname)s:\t %(message)s')
console.setFormatter(formatter)
LOG.addHandler(console)

Expand Down

0 comments on commit 16fe33a

Please sign in to comment.