Skip to content

Commit

Permalink
Log output to stdout, not stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
johnramsden committed Feb 24, 2019
1 parent 902f0b4 commit 9f4ad19
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions zedenv/lib/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import logging.config
import logging.handlers
import sys


class ZELogger:
Expand All @@ -13,17 +14,27 @@ class ZELogger:
'console': {
'class': 'logging.Formatter',
'format': '%(message)s',
},
'error': {
'class': 'logging.Formatter',
'format': '%(message)s',
}
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'level': logging.DEBUG,
'level': logging.INFO,
'formatter': 'console',
'stream': sys.stdout,
},
'error': {
'class': 'logging.StreamHandler',
'level': logging.DEBUG,
'formatter': 'error',
},
},
'root': {
'level': logging.DEBUG,
'level': logging.INFO,
'handlers': ['console']
},
}
Expand Down

0 comments on commit 9f4ad19

Please sign in to comment.