Write log to stderr
Be consistent with python's default behavior and play nice with CGI.
This commit is contained in:
parent
14515cfe27
commit
c091399f5e
2
logging
2
logging
@ -39,7 +39,7 @@ handlers = console,file
|
||||
# Console handler
|
||||
class = StreamHandler
|
||||
level = INFO
|
||||
args = (sys.stdout,)
|
||||
args = (sys.stderr,)
|
||||
formatter = simple
|
||||
|
||||
[handler_file]
|
||||
|
@ -55,9 +55,9 @@ def start(name="radicale", filename=None, debug=False):
|
||||
# Default configuration, standard output
|
||||
if filename:
|
||||
logger.warning(
|
||||
"Logging configuration file '%s' not found, using stdout." %
|
||||
"Logging configuration file '%s' not found, using stderr." %
|
||||
filename)
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
handler = logging.StreamHandler(sys.stderr)
|
||||
handler.setFormatter(logging.Formatter("%(message)s"))
|
||||
logger.addHandler(handler)
|
||||
if debug:
|
||||
|
Loading…
Reference in New Issue
Block a user