From aa5dc3b417db962a075a092d0d3528010c1059f7 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 21 Apr 2015 18:19:17 -0400 Subject: Use python logging in install / log cherrypy at right severity This replaces the print statements in the installer code with a python logger so we can log all output to the installer log and a subset of it to stdout in one step without duplication. The cherrypy.log.error() logs to the "error" log at a severity of logging.INFO by default. Set an appropriate log level for these as well. https://fedorahosted.org/ipsilon/ticket/35 Signed-off-by: Rob Crittenden Reviewed-by: Simo Sorce --- ipsilon/util/log.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ipsilon/util/log.py') diff --git a/ipsilon/util/log.py b/ipsilon/util/log.py index 6ccfc42..ae851af 100644 --- a/ipsilon/util/log.py +++ b/ipsilon/util/log.py @@ -7,6 +7,7 @@ import cStringIO import inspect import os import traceback +import logging def log_request_response(): @@ -327,6 +328,6 @@ class Log(object): cherrypy.log(fact) def error(self, fact): - cherrypy.log.error('ERROR: %s' % fact) + cherrypy.log.error('ERROR: %s' % fact, severity=logging.ERROR) if cherrypy.config.get('stacktrace_on_error', False): cherrypy.log.error(Log.stacktrace()) -- cgit