logging: Output to stderr, not stdout
This commit is contained in:
parent
7bb4aff1b3
commit
24aea160b1
1 changed files with 3 additions and 3 deletions
|
|
@ -399,11 +399,11 @@ class Application(object):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create_default_logger(cls):
|
def create_default_logger(cls):
|
||||||
# stdout logger
|
# stderr logger
|
||||||
format = '%(asctime)s:%(levelname)s:%(name)s:' + cls.VERSION +\
|
format = '%(asctime)s:%(levelname)s:%(name)s:' + cls.VERSION +\
|
||||||
':%(filename)s:%(lineno)d:%(funcName)s %(message)s'
|
':%(filename)s:%(lineno)d:%(funcName)s %(message)s'
|
||||||
handler = logging.StreamHandler(cls.stdout)
|
handler = logging.StreamHandler(cls.stderr)
|
||||||
handler.setFormatter(createColoredFormatter(cls.stdout, format))
|
handler.setFormatter(createColoredFormatter(cls.stderr, format))
|
||||||
return handler
|
return handler
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue