forked from openlp/openlp
Cleanup loggin levels and amend default
This commit is contained in:
parent
af58043690
commit
b5a4178ca7
|
@ -91,7 +91,7 @@ class OpenLP(QtGui.QApplication):
|
||||||
u'version': bits[0],
|
u'version': bits[0],
|
||||||
u'build': bits[1]
|
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']))
|
app_version[u'version'], app_version[u'build']))
|
||||||
except:
|
except:
|
||||||
app_version = {
|
app_version = {
|
||||||
|
@ -148,7 +148,7 @@ def main():
|
||||||
usage = u'Usage: %prog [options] [qt-options]'
|
usage = u'Usage: %prog [options] [qt-options]'
|
||||||
parser = OptionParser(usage=usage)
|
parser = OptionParser(usage=usage)
|
||||||
parser.add_option("-l", "--log-level", dest="loglevel",
|
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 "
|
help="Set logging to LEVEL level. Valid values are "
|
||||||
"\"debug\", \"info\", \"warning\".")
|
"\"debug\", \"info\", \"warning\".")
|
||||||
parser.add_option("-p", "--portable", dest="portable",
|
parser.add_option("-p", "--portable", dest="portable",
|
||||||
|
|
|
@ -54,7 +54,7 @@ class PluginManager(object):
|
||||||
log.debug(u'Base path %s ', self.basepath)
|
log.debug(u'Base path %s ', self.basepath)
|
||||||
self.plugins = []
|
self.plugins = []
|
||||||
# this has to happen after the UI is sorted self.find_plugins(dir)
|
# 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):
|
def find_plugins(self, dir, plugin_helpers):
|
||||||
"""
|
"""
|
||||||
|
@ -200,6 +200,7 @@ class PluginManager(object):
|
||||||
% (plugin.name, plugin.is_active()))
|
% (plugin.name, plugin.is_active()))
|
||||||
if plugin.is_active():
|
if plugin.is_active():
|
||||||
plugin.initialise()
|
plugin.initialise()
|
||||||
|
log.warn(u'Initialisation Complete for %s ' % plugin.name)
|
||||||
if not plugin.is_active():
|
if not plugin.is_active():
|
||||||
plugin.remove_toolbox_item()
|
plugin.remove_toolbox_item()
|
||||||
|
|
||||||
|
@ -212,3 +213,4 @@ class PluginManager(object):
|
||||||
for plugin in self.plugins:
|
for plugin in self.plugins:
|
||||||
if plugin.is_active():
|
if plugin.is_active():
|
||||||
plugin.finalise()
|
plugin.finalise()
|
||||||
|
log.warn(u'Finalisation Complete for %s ' % plugin.name)
|
||||||
|
|
|
@ -50,6 +50,7 @@ class BiblePlugin(Plugin):
|
||||||
self.insert_toolbox_item()
|
self.insert_toolbox_item()
|
||||||
self.ImportBibleItem.setVisible(True)
|
self.ImportBibleItem.setVisible(True)
|
||||||
self.ExportBibleItem.setVisible(True)
|
self.ExportBibleItem.setVisible(True)
|
||||||
|
log.warn(u'Bibles Initialised')
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
log.info(u'Plugin Finalise')
|
log.info(u'Plugin Finalise')
|
||||||
|
|
Loading…
Reference in New Issue