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/data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ipsilon/util/data.py') diff --git a/ipsilon/util/data.py b/ipsilon/util/data.py index a365e33..0d1c2df 100644 --- a/ipsilon/util/data.py +++ b/ipsilon/util/data.py @@ -24,6 +24,7 @@ from sqlalchemy.sql import select import ConfigParser import os import uuid +import logging OPTIONS_COLUMNS = ['name', 'option', 'value'] @@ -36,7 +37,7 @@ class SqlStore(Log): @classmethod def get_connection(cls, name): if name not in cls.__instances.keys(): - print 'SqlStore new: %s' % name + logging.debug('SqlStore new: %s', name) cls.__instances[name] = SqlStore(name) return cls.__instances[name] -- cgit