Cleanup loggin levels and amend default

This commit is contained in:
Tim Bentley 2010-02-03 17:23:33 +00:00
parent af58043690
commit b5a4178ca7
7 changed files with 12 additions and 9 deletions

View File

@ -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",

View File

@ -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()
plugin.finalise()
log.warn(u'Finalisation Complete for %s ' % plugin.name)

View File

@ -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('<strong>Bible Plugin</strong><br />This '
'plugin allows bible verses from different sources to be '
'displayed on the screen during the service.')
return about_text
return about_text

View File

@ -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.<br>')
return about_text
return about_text

View File

@ -62,4 +62,4 @@ class ImagePlugin(Plugin):
'<i>Override background</i> 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.<br>')
return about_text
return about_text

View File

@ -56,4 +56,4 @@ class MediaPlugin(Plugin):
def about(self):
about_text = self.trUtf8('<b>Media Plugin</b><br>This plugin '
'allows the playing of audio and video media')
return about_text
return about_text

View File

@ -83,4 +83,4 @@ class RemotesPlugin(Plugin):
'provides the ability to send messages to a running version of '
'openlp on a different computer.<br>The Primary use for this '
'would be to send alerts from a creche')
return about_text
return about_text