From 2353bf7eb45e8e7c9d3475f338b14438395db85f Mon Sep 17 00:00:00 2001 From: boyska Date: Thu, 27 Feb 2014 17:04:12 +0100 Subject: [PATCH] I hate print --- server/server.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/server/server.py b/server/server.py index f9b2f23..953f43d 100644 --- a/server/server.py +++ b/server/server.py @@ -81,14 +81,12 @@ class RecAPI(Bottle): def create(self): req = dict(request.POST.allitems()) ret = {} - print "Server:: Create request %s " % req + logger.debug("Server:: Create request %s " % req) starttime = datetime.now() name = "" endtime = datetime.now() - print "Starttime %s EndTime %s" %\ - (starttime, endtime) rec = Rec(name=name, starttime=starttime, endtime=endtime) @@ -162,7 +160,7 @@ class RecAPI(Bottle): start=rec.starttime, end=rec.endtime, outfile=os.path.join(get_config()['AUDIO_OUTPUT'], rec.filename)) - print "SUBMITTED: %d" % job_id + logger.debug("SUBMITTED: %d" % job_id) return self.rec_msg("Aggiornamento completato!", job_id=job_id, result='/output/' + rec.filename, @@ -200,7 +198,7 @@ class RecAPI(Bottle): def search(self, args=None): req = dict() req.update(request.GET.allitems()) - print "Search request: %s" % (req) + logger.debug("Search request: %s" % (req)) values = self.db._search(**req) from pprint import pprint @@ -251,10 +249,6 @@ class RecServer: self.db = RecDB(get_config()['DB_URI']) def _route(self): - ### This is the API part of the app - # TODO: move to namespace /api/ - # TODO: create a "sub-application" - ## Static part of the site self._app.route('/output/', callback=lambda filepath: