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/rest/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ipsilon/rest/common.py') diff --git a/ipsilon/rest/common.py b/ipsilon/rest/common.py index 7baea94..904545c 100644 --- a/ipsilon/rest/common.py +++ b/ipsilon/rest/common.py @@ -2,6 +2,7 @@ import cherrypy import json +import logging from functools import wraps from ipsilon.util.endpoint import Endpoint @@ -54,7 +55,8 @@ class RestPlugins(RestPage): for plugin in self._site[facility].available: obj = self._site[facility].available[plugin] if hasattr(obj, 'rest'): - cherrypy.log.error('Rest plugin: %s' % plugin) + cherrypy.log.error('Rest plugin: %s' % plugin, + severity=logging.DEBUG) obj.rest.mount(self) def root_with_msg(self, message=None, message_type=None, changed=None): -- cgit