From b5a4178ca7dbcabd6bbbb60b88c43364b5fc9520 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 3 Feb 2010 17:23:33 +0000 Subject: [PATCH] Cleanup loggin levels and amend default --- openlp.pyw | 4 ++-- openlp/core/lib/pluginmanager.py | 6 ++++-- openlp/plugins/bibles/bibleplugin.py | 3 ++- openlp/plugins/custom/customplugin.py | 2 +- openlp/plugins/images/imageplugin.py | 2 +- openlp/plugins/media/mediaplugin.py | 2 +- openlp/plugins/remotes/remoteplugin.py | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/openlp.pyw b/openlp.pyw index 78e10e74a..f87afdbfd 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -91,7 +91,7 @@ class OpenLP(QtGui.QApplication): u'version': bits[0], u'build': bits[1] } - log.info(u'Openlp version %s build %s' % ( + log.warn(u'Openlp version %s build %s' % ( app_version[u'version'], app_version[u'build'])) except: app_version = { @@ -148,7 +148,7 @@ def main(): usage = u'Usage: %prog [options] [qt-options]' parser = OptionParser(usage=usage) parser.add_option("-l", "--log-level", dest="loglevel", - default="info", metavar="LEVEL", + default="warning", metavar="LEVEL", help="Set logging to LEVEL level. Valid values are " "\"debug\", \"info\", \"warning\".") parser.add_option("-p", "--portable", dest="portable", diff --git a/openlp/core/lib/pluginmanager.py b/openlp/core/lib/pluginmanager.py index c580555ff..adc79fab6 100644 --- a/openlp/core/lib/pluginmanager.py +++ b/openlp/core/lib/pluginmanager.py @@ -54,7 +54,7 @@ class PluginManager(object): log.debug(u'Base path %s ', self.basepath) self.plugins = [] # this has to happen after the UI is sorted self.find_plugins(dir) - log.info(u'Plugin manager done init') + log.warn(u'Plugin manager Initialised') def find_plugins(self, dir, plugin_helpers): """ @@ -200,6 +200,7 @@ class PluginManager(object): % (plugin.name, plugin.is_active())) if plugin.is_active(): plugin.initialise() + log.warn(u'Initialisation Complete for %s ' % plugin.name) if not plugin.is_active(): plugin.remove_toolbox_item() @@ -211,4 +212,5 @@ class PluginManager(object): log.info(u'finalising plugins') for plugin in self.plugins: if plugin.is_active(): - plugin.finalise() \ No newline at end of file + plugin.finalise() + log.warn(u'Finalisation Complete for %s ' % plugin.name) diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py index 912a02212..a43af02de 100644 --- a/openlp/plugins/bibles/bibleplugin.py +++ b/openlp/plugins/bibles/bibleplugin.py @@ -50,6 +50,7 @@ class BiblePlugin(Plugin): self.insert_toolbox_item() self.ImportBibleItem.setVisible(True) self.ExportBibleItem.setVisible(True) + log.warn(u'Bibles Initialised') def finalise(self): log.info(u'Plugin Finalise') @@ -90,4 +91,4 @@ class BiblePlugin(Plugin): about_text = self.trUtf8('Bible Plugin
This ' 'plugin allows bible verses from different sources to be ' 'displayed on the screen during the service.') - return about_text \ No newline at end of file + return about_text diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py index 8da4fabfd..91c89212a 100644 --- a/openlp/plugins/custom/customplugin.py +++ b/openlp/plugins/custom/customplugin.py @@ -72,4 +72,4 @@ class CustomPlugin(Plugin): 'allows slides to be displayed on the screen in the same way ' 'songs are. This plugin provides greater freedom over the ' 'songs plugin.
') - return about_text \ No newline at end of file + return about_text diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py index dc4b7eec2..5d4c9252e 100644 --- a/openlp/plugins/images/imageplugin.py +++ b/openlp/plugins/images/imageplugin.py @@ -62,4 +62,4 @@ class ImagePlugin(Plugin): 'Override background is chosen and an image is selected ' 'any somgs which are rendered will use the selected image from ' 'the background instead of the one provied by the theme.
') - return about_text \ No newline at end of file + return about_text diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py index a338fa021..f1b7fa653 100644 --- a/openlp/plugins/media/mediaplugin.py +++ b/openlp/plugins/media/mediaplugin.py @@ -56,4 +56,4 @@ class MediaPlugin(Plugin): def about(self): about_text = self.trUtf8('Media Plugin
This plugin ' 'allows the playing of audio and video media') - return about_text \ No newline at end of file + return about_text diff --git a/openlp/plugins/remotes/remoteplugin.py b/openlp/plugins/remotes/remoteplugin.py index 428cdbf90..23c8b9bc7 100644 --- a/openlp/plugins/remotes/remoteplugin.py +++ b/openlp/plugins/remotes/remoteplugin.py @@ -83,4 +83,4 @@ class RemotesPlugin(Plugin): 'provides the ability to send messages to a running version of ' 'openlp on a different computer.
The Primary use for this ' 'would be to send alerts from a creche') - return about_text \ No newline at end of file + return about_text