From 9f64602338a581468e48bc2c0322f17a3f70e4af Mon Sep 17 00:00:00 2001 From: Worros Date: Fri, 1 Oct 2010 10:44:27 +0800 Subject: [PATCH] Database, Importer: Convert print to log.info --- pyfpdb/Database.py | 2 +- pyfpdb/fpdb_import.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index e94074c4..af8c4a3b 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1586,7 +1586,7 @@ class Database: self.connection.set_isolation_level(1) # go back to normal isolation level self.commit() atime = time() - stime - print _("Analyze took %.1f seconds") % (atime,) + log.info(_("Analyze took %.1f seconds") % (atime,)) #end def analyzeDB def vacuumDB(self): diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index cea95321..4c055bd1 100755 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -239,7 +239,7 @@ class Importer: if self.settings['dropIndexes'] == 'drop': self.database.prepareBulkImport() else: - log.debug(_("No need to drop indexes.")) + log.info(_("No need to drop indexes.")) #print "dropInd =", self.settings['dropIndexes'], " dropHudCache =", self.settings['dropHudCache'] if self.settings['threads'] <= 0: @@ -277,11 +277,11 @@ class Importer: if self.settings['dropIndexes'] == 'drop': self.database.afterBulkImport() else: - print _("No need to rebuild indexes.") + log.info (_("No need to rebuild indexes.")) if 'dropHudCache' in self.settings and self.settings['dropHudCache'] == 'drop': self.database.rebuild_hudcache() else: - print _("No need to rebuild hudcache.") + log.info (_("No need to rebuild hudcache.")) self.database.analyzeDB() endtime = time() return (totstored, totdups, totpartial, toterrors, endtime-starttime)