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/admin/common.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ipsilon/admin/common.py') diff --git a/ipsilon/admin/common.py b/ipsilon/admin/common.py index a85a15d..87bfcd5 100644 --- a/ipsilon/admin/common.py +++ b/ipsilon/admin/common.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import cherrypy +import logging from ipsilon.util.page import Page from ipsilon.util.page import admin_protect from ipsilon.util.endpoint import allow_iframe @@ -113,7 +114,8 @@ class AdminPluginConfig(AdminPage): if value != option.get_value(): cherrypy.log.error("Storing [%s]: %s = %s" % - (self._po.name, name, value)) + (self._po.name, name, value), + severity=logging.DEBUG) option.set_value(value) new_db_values[name] = option.export_value() @@ -222,7 +224,8 @@ class AdminPlugins(AdminPage): return for plugin in self._site[facility].available: - cherrypy.log.error('Admin info plugin: %s' % plugin) + cherrypy.log.error('Admin info plugin: %s' % plugin, + severity=logging.DEBUG) obj = self._site[facility].available[plugin] page = AdminPluginConfig(obj, self._site, self) if hasattr(obj, 'admin'): -- cgit