Clean up all the Gloab log statements

This commit is contained in:
Tim Bentley 2010-02-27 15:31:23 +00:00
parent 065986c33c
commit 325fab92da
46 changed files with 98 additions and 118 deletions

View File

@ -59,13 +59,13 @@ QToolBar
padding: 0; padding: 0;
} }
""" """
log = logging.getLogger(__name__)
class OpenLP(QtGui.QApplication): class OpenLP(QtGui.QApplication):
""" """
The core application class. This class inherits from Qt's QApplication The core application class. This class inherits from Qt's QApplication
class in order to provide the core of the application. class in order to provide the core of the application.
""" """
global log
log.info(u'OpenLP Application Loaded') log.info(u'OpenLP Application Loaded')
def notify(self, obj, evt): def notify(self, obj, evt):

View File

@ -27,6 +27,8 @@ import logging
from PyQt4 import QtCore from PyQt4 import QtCore
log = logging.getLogger(__name__)
class EventReceiver(QtCore.QObject): class EventReceiver(QtCore.QObject):
""" """
Class to allow events to be passed from different parts of the Class to allow events to be passed from different parts of the
@ -108,9 +110,6 @@ class EventReceiver(QtCore.QObject):
Informs all components of the presentation types supported. Informs all components of the presentation types supported.
""" """
global log
log = logging.getLogger(u'EventReceiver')
def __init__(self): def __init__(self):
""" """
Initialise the event receiver, calling the parent constructor. Initialise the event receiver, calling the parent constructor.

View File

@ -32,6 +32,8 @@ from openlp.core.lib.toolbar import *
from openlp.core.lib import contextMenuAction, contextMenuSeparator from openlp.core.lib import contextMenuAction, contextMenuSeparator
from serviceitem import ServiceItem from serviceitem import ServiceItem
log = logging.getLogger(__name__)
class MediaManagerItem(QtGui.QWidget): class MediaManagerItem(QtGui.QWidget):
""" """
MediaManagerItem is a helper widget for plugins. MediaManagerItem is a helper widget for plugins.
@ -92,9 +94,6 @@ class MediaManagerItem(QtGui.QWidget):
method is not defined, a default will be used (treat the method is not defined, a default will be used (treat the
filename as an image). filename as an image).
""" """
global log
log = logging.getLogger(u'MediaManagerItem')
log.info(u'Media Item loaded') log.info(u'Media Item loaded')
def __init__(self, parent=None, icon=None, title=None): def __init__(self, parent=None, icon=None, title=None):

View File

@ -28,6 +28,8 @@ from PyQt4 import QtCore
from openlp.core.lib import PluginConfig, Receiver from openlp.core.lib import PluginConfig, Receiver
log = logging.getLogger(__name__)
class PluginStatus(object): class PluginStatus(object):
""" """
Defines the status of the plugin Defines the status of the plugin
@ -88,8 +90,6 @@ class Plugin(QtCore.QObject):
Used in the plugin manager, when a person clicks on the 'About' button. Used in the plugin manager, when a person clicks on the 'About' button.
""" """
global log
log = logging.getLogger(u'Plugin')
log.info(u'loaded') log.info(u'loaded')
def __init__(self, name, version=None, plugin_helpers=None): def __init__(self, name, version=None, plugin_helpers=None):

View File

@ -29,13 +29,13 @@ import logging
from openlp.core.lib import Plugin, PluginStatus from openlp.core.lib import Plugin, PluginStatus
log = logging.getLogger(__name__)
class PluginManager(object): class PluginManager(object):
""" """
This is the Plugin manager, which loads all the plugins, This is the Plugin manager, which loads all the plugins,
and executes all the hooks, as and when necessary. and executes all the hooks, as and when necessary.
""" """
global log
log = logging.getLogger(u'PluginMgr')
log.info(u'Plugin manager loaded') log.info(u'Plugin manager loaded')
def __init__(self, dir): def __init__(self, dir):

View File

@ -28,13 +28,13 @@ import logging
from PyQt4 import QtGui, QtCore from PyQt4 import QtGui, QtCore
from openlp.core.lib import resize_image from openlp.core.lib import resize_image
log = logging.getLogger(__name__)
class Renderer(object): class Renderer(object):
""" """
Genarates a pixmap image of a array of text. The Text is formatted to Genarates a pixmap image of a array of text. The Text is formatted to
make sure it fits on the screen and if not extra frames are generated. make sure it fits on the screen and if not extra frames are generated.
""" """
global log
log = logging.getLogger(u'Renderer')
log.info(u'Renderer Loaded') log.info(u'Renderer Loaded')
def __init__(self): def __init__(self):

View File

@ -30,6 +30,8 @@ from PyQt4 import QtCore
from renderer import Renderer from renderer import Renderer
from openlp.core.lib import ThemeLevel from openlp.core.lib import ThemeLevel
log = logging.getLogger(__name__)
class RenderManager(object): class RenderManager(object):
""" """
Class to pull all Renderer interactions into one place. The plugins will Class to pull all Renderer interactions into one place. The plugins will
@ -45,8 +47,6 @@ class RenderManager(object):
``screen_number`` ``screen_number``
Defaults to *0*. The index of the output/display screen. Defaults to *0*. The index of the output/display screen.
""" """
global log
log = logging.getLogger(u'RenderManager')
log.info(u'RenderManager Loaded') log.info(u'RenderManager Loaded')
def __init__(self, theme_manager, screens, screen_number=0): def __init__(self, theme_manager, screens, screen_number=0):

View File

@ -32,6 +32,8 @@ from PyQt4 import QtGui
from openlp.core.lib import build_icon, Receiver, resize_image from openlp.core.lib import build_icon, Receiver, resize_image
log = logging.getLogger(__name__)
class ServiceItemType(object): class ServiceItemType(object):
""" """
Defines the type of service item Defines the type of service item
@ -46,8 +48,6 @@ class ServiceItem(object):
the service manager, the slide controller, and the projection screen the service manager, the slide controller, and the projection screen
compositor. compositor.
""" """
global log
log = logging.getLogger(u'ServiceItem')
log.info(u'Service Item created') log.info(u'Service Item created')
def __init__(self, plugin=None): def __init__(self, plugin=None):

View File

@ -27,6 +27,8 @@ import logging
from xml.dom.minidom import Document from xml.dom.minidom import Document
from xml.etree.ElementTree import ElementTree, XML, dump from xml.etree.ElementTree import ElementTree, XML, dump
log = logging.getLogger(__name__)
class SongXMLBuilder(object): class SongXMLBuilder(object):
""" """
This class builds the XML used to describe songs. This class builds the XML used to describe songs.
@ -42,8 +44,6 @@ class SongXMLBuilder(object):
</lyrics> </lyrics>
</song> </song>
""" """
global log
log = logging.getLogger(u'SongXMLBuilder')
log.info(u'SongXMLBuilder Loaded') log.info(u'SongXMLBuilder Loaded')
def __init__(self): def __init__(self):
@ -123,8 +123,6 @@ class SongXMLParser(object):
</lyrics> </lyrics>
</song> </song>
""" """
global log
log = logging.getLogger(u'SongXMLParser')
log.info(u'SongXMLParser Loaded') log.info(u'SongXMLParser Loaded')
def __init__(self, xml): def __init__(self, xml):
@ -158,4 +156,4 @@ class SongXMLParser(object):
""" """
Debugging aid to dump XML so that we can see what we have. Debugging aid to dump XML so that we can see what we have.
""" """
return dump(self.song_xml) return dump(self.song_xml)

View File

@ -31,13 +31,13 @@ from PyQt4.phonon import Phonon
from openlp.core.lib import Receiver, resize_image from openlp.core.lib import Receiver, resize_image
log = logging.getLogger(__name__)
class DisplayWidget(QtGui.QWidget): class DisplayWidget(QtGui.QWidget):
""" """
Customised version of QTableWidget which can respond to keyboard Customised version of QTableWidget which can respond to keyboard
events. events.
""" """
global log
log = logging.getLogger(u'MainDisplay')
log.info(u'MainDisplay loaded') log.info(u'MainDisplay loaded')
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
@ -78,8 +78,6 @@ class MainDisplay(DisplayWidget):
""" """
This is the form that is used to display things on the projector. This is the form that is used to display things on the projector.
""" """
global log
log = logging.getLogger(u'MainDisplay')
log.info(u'MainDisplay Loaded') log.info(u'MainDisplay Loaded')
def __init__(self, parent, screens): def __init__(self, parent, screens):

View File

@ -36,6 +36,8 @@ from openlp.core.lib import RenderManager, PluginConfig, build_icon, \
OpenLPDockWidget, SettingsManager, PluginManager, Receiver, str_to_bool OpenLPDockWidget, SettingsManager, PluginManager, Receiver, str_to_bool
from openlp.core.utils import check_latest_version from openlp.core.utils import check_latest_version
log = logging.getLogger(__name__)
media_manager_style = """ media_manager_style = """
QToolBox::tab { QToolBox::tab {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
@ -420,8 +422,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
""" """
The main window. The main window.
""" """
global log
log = logging.getLogger(u'MainWindow')
log.info(u'MainWindow loaded') log.info(u'MainWindow loaded')
def __init__(self, screens, applicationVersion): def __init__(self, screens, applicationVersion):

View File

@ -30,9 +30,9 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib.plugin import PluginStatus from openlp.core.lib.plugin import PluginStatus
from plugindialog import Ui_PluginViewDialog from plugindialog import Ui_PluginViewDialog
log = logging.getLogger(__name__)
class PluginForm(QtGui.QDialog, Ui_PluginViewDialog): class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
global log
log = logging.getLogger(u'PluginForm')
def __init__(self, parent=None): def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent) QtGui.QDialog.__init__(self, parent)
@ -126,4 +126,4 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
elif self.activePlugin.status == PluginStatus.Disabled: elif self.activePlugin.status == PluginStatus.Disabled:
status_text = 'Disabled' status_text = 'Disabled'
self.PluginListWidget.currentItem().setText( self.PluginListWidget.currentItem().setText(
u'%s (%s)' % (self.activePlugin.name, status_text)) u'%s (%s)' % (self.activePlugin.name, status_text))

View File

@ -24,12 +24,12 @@
############################################################################### ###############################################################################
import logging import logging
log = logging.getLogger(__name__)
class ScreenList(object): class ScreenList(object):
""" """
Wrapper to handle the parameters of the display screen Wrapper to handle the parameters of the display screen
""" """
global log
log = logging.getLogger(u'Screen')
log.info(u'Screen loaded') log.info(u'Screen loaded')
def __init__(self): def __init__(self):

View File

@ -28,6 +28,8 @@ import logging
import cPickle import cPickle
import zipfile import zipfile
log = logging.getLogger(__name__)
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import PluginConfig, OpenLPToolbar, ServiceItem, \ from openlp.core.lib import PluginConfig, OpenLPToolbar, ServiceItem, \
contextMenuAction, contextMenuSeparator, contextMenu, Receiver, \ contextMenuAction, contextMenuSeparator, contextMenu, Receiver, \
@ -105,9 +107,6 @@ class ServiceManager(QtGui.QWidget):
the resources used into one OSZ file for use on any OpenLP v2 installation. the resources used into one OSZ file for use on any OpenLP v2 installation.
Also handles the UI tasks of moving things up and down etc. Also handles the UI tasks of moving things up and down etc.
""" """
global log
log = logging.getLogger(u'ServiceManager')
def __init__(self, parent): def __init__(self, parent):
""" """
Sets up the service manager, toolbars, list view, et al. Sets up the service manager, toolbars, list view, et al.

View File

@ -33,6 +33,8 @@ from PyQt4.phonon import Phonon
from openlp.core.lib import OpenLPToolbar, Receiver, str_to_bool, \ from openlp.core.lib import OpenLPToolbar, Receiver, str_to_bool, \
PluginConfig, resize_image PluginConfig, resize_image
log = logging.getLogger(__name__)
class SlideList(QtGui.QTableWidget): class SlideList(QtGui.QTableWidget):
""" """
Customised version of QTableWidget which can respond to keyboard Customised version of QTableWidget which can respond to keyboard
@ -74,9 +76,6 @@ class SlideController(QtGui.QWidget):
SlideController is the slide controller widget. This widget is what the SlideController is the slide controller widget. This widget is what the
user uses to control the displaying of verses/slides/etc on the screen. user uses to control the displaying of verses/slides/etc on the screen.
""" """
global log
log = logging.getLogger(u'SlideController')
def __init__(self, parent, settingsmanager, isLive=False): def __init__(self, parent, settingsmanager, isLive=False):
""" """
Set up the Slide Controller. Set up the Slide Controller.

View File

@ -38,13 +38,12 @@ from openlp.core.lib import PluginConfig, OpenLPToolbar, contextMenuAction, \
contextMenuSeparator contextMenuSeparator
from openlp.core.utils import ConfigHelper from openlp.core.utils import ConfigHelper
log = logging.getLogger(__name__)
class ThemeManager(QtGui.QWidget): class ThemeManager(QtGui.QWidget):
""" """
Manages the orders of Theme. Manages the orders of Theme.
""" """
global log
log = logging.getLogger(u'ThemeManager')
def __init__(self, parent): def __init__(self, parent):
QtGui.QWidget.__init__(self, parent) QtGui.QWidget.__init__(self, parent)
self.parent = parent self.parent = parent

View File

@ -25,9 +25,9 @@
import logging import logging
log = logging.getLogger(__name__)
class Display(): class Display():
global log
log = logging.getLogger(u'Display Logger')
log.info(u'Display Class loaded') log.info(u'Display Class loaded')
@staticmethod @staticmethod
@ -39,4 +39,4 @@ class Display():
def sub_output(string): def sub_output(string):
if not string is None: if not string is None:
log.debug(u' '+string); log.debug(u' '+string);
print (u' '+string) print (u' '+string)

View File

@ -31,9 +31,9 @@ from openlp.core.lib import Plugin, build_icon, PluginStatus
from openlp.plugins.alerts.lib import AlertsManager, DBManager from openlp.plugins.alerts.lib import AlertsManager, DBManager
from openlp.plugins.alerts.forms import AlertsTab, AlertForm, AlertEditForm from openlp.plugins.alerts.forms import AlertsTab, AlertForm, AlertEditForm
log = logging.getLogger(__name__)
class alertsPlugin(Plugin): class alertsPlugin(Plugin):
global log
log = logging.getLogger(u'AlertsPlugin')
log.info(u'Alerts Plugin loaded') log.info(u'Alerts Plugin loaded')
def __init__(self, plugin_helpers): def __init__(self, plugin_helpers):

View File

@ -29,12 +29,12 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver from openlp.core.lib import Receiver
log = logging.getLogger(__name__)
class AlertsManager(QtCore.QObject): class AlertsManager(QtCore.QObject):
""" """
BiblesTab is the Bibles settings tab in the settings dialog. AlertsTab is the Alerts settings tab in the settings dialog.
""" """
global log
log = logging.getLogger(u'AlertManager')
log.info(u'Alert Manager loaded') log.info(u'Alert Manager loaded')
def __init__(self, parent): def __init__(self, parent):

View File

@ -27,14 +27,13 @@ import logging
from openlp.plugins.alerts.lib.models import init_models, metadata, AlertItem from openlp.plugins.alerts.lib.models import init_models, metadata, AlertItem
log = logging.getLogger(__name__)
class DBManager(): class DBManager():
""" """
The Song Manager provides a central location for all database code. This The Song Manager provides a central location for all database code. This
class takes care of connecting to the database and running all the queries. class takes care of connecting to the database and running all the queries.
""" """
global log
log = logging.getLogger(u'AlertsDBManager')
log.info(u'Alerts DB loaded') log.info(u'Alerts DB loaded')
def __init__(self, config): def __init__(self, config):

View File

@ -30,9 +30,9 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import Plugin, build_icon, PluginStatus from openlp.core.lib import Plugin, build_icon, PluginStatus
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
log = logging.getLogger(__name__)
class BiblePlugin(Plugin): class BiblePlugin(Plugin):
global log
log = logging.getLogger(u'BiblePlugin')
log.info(u'Bible Plugin loaded') log.info(u'Bible Plugin loaded')
def __init__(self, plugin_helpers): def __init__(self, plugin_helpers):

View File

@ -34,6 +34,8 @@ from bibleimportwizard import Ui_BibleImportWizard
from openlp.core.lib import Receiver from openlp.core.lib import Receiver
from openlp.plugins.bibles.lib.manager import BibleFormat from openlp.plugins.bibles.lib.manager import BibleFormat
log = logging.getLogger(__name__)
class DownloadLocation(object): class DownloadLocation(object):
Unknown = -1 Unknown = -1
Crosswalk = 0 Crosswalk = 0
@ -54,9 +56,6 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
This is the Bible Import Wizard, which allows easy importing of Bibles This is the Bible Import Wizard, which allows easy importing of Bibles
into OpenLP from other formats like OSIS, CSV and OpenSong. into OpenLP from other formats like OSIS, CSV and OpenSong.
""" """
global log
log = logging.getLogger(u'BibleImportForm')
log.info(u'BibleImportForm loaded') log.info(u'BibleImportForm loaded')
def __init__(self, parent, config, manager, bibleplugin): def __init__(self, parent, config, manager, bibleplugin):
@ -371,4 +370,4 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
self.ImportProgressBar.setValue(self.ImportProgressBar.maximum()) self.ImportProgressBar.setValue(self.ImportProgressBar.maximum())
self.finishButton.setVisible(True) self.finishButton.setVisible(True)
self.cancelButton.setVisible(False) self.cancelButton.setVisible(False)
Receiver.send_message(u'process_events') Receiver.send_message(u'process_events')

View File

@ -29,12 +29,12 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import str_to_bool, Receiver, SettingsTab from openlp.core.lib import str_to_bool, Receiver, SettingsTab
log = logging.getLogger(__name__)
class BiblesTab(SettingsTab): class BiblesTab(SettingsTab):
""" """
BiblesTab is the Bibles settings tab in the settings dialog. BiblesTab is the Bibles settings tab in the settings dialog.
""" """
global log
log = logging.getLogger(u'BibleTab')
log.info(u'Bible Tab loaded') log.info(u'Bible Tab loaded')
def __init__(self, title, section=None): def __init__(self, title, section=None):

View File

@ -33,6 +33,8 @@ from csvbible import CSVBible
from db import BibleDB from db import BibleDB
from http import HTTPBible from http import HTTPBible
log = logging.getLogger(__name__)
class BibleMode(object): class BibleMode(object):
""" """
This is basically an enumeration class which specifies the mode of a Bible. This is basically an enumeration class which specifies the mode of a Bible.
@ -85,8 +87,6 @@ class BibleManager(object):
""" """
The Bible manager which holds and manages all the Bibles. The Bible manager which holds and manages all the Bibles.
""" """
global log
log = logging.getLogger(u'BibleManager')
log.info(u'Bible manager loaded') log.info(u'Bible manager loaded')
def __init__(self, parent, config): def __init__(self, parent, config):

View File

@ -32,6 +32,8 @@ from openlp.core.lib import MediaManagerItem, Receiver, str_to_bool, \
BaseListWithDnD BaseListWithDnD
from openlp.plugins.bibles.forms import ImportWizardForm from openlp.plugins.bibles.forms import ImportWizardForm
log = logging.getLogger(__name__)
class BibleListView(BaseListWithDnD): class BibleListView(BaseListWithDnD):
""" """
Drag and drop capable list for Bibles. Drag and drop capable list for Bibles.
@ -47,8 +49,6 @@ class BibleMediaItem(MediaManagerItem):
""" """
This is the custom media manager item for Bibles. This is the custom media manager item for Bibles.
""" """
global log
log = logging.getLogger(u'BibleMediaItem')
log.info(u'Bible Media Item loaded') log.info(u'Bible Media Item loaded')
def __init__(self, parent, icon, title): def __init__(self, parent, icon, title):

View File

@ -33,12 +33,12 @@ import re
from openlp.core.lib import Receiver from openlp.core.lib import Receiver
from db import BibleDB from db import BibleDB
log = logging.getLogger(__name__)
class OSISBible(BibleDB): class OSISBible(BibleDB):
""" """
OSIS Bible format importer class. OSIS Bible format importer class.
""" """
global log
log = logging.getLogger(u'BibleOSISImpl')
log.info(u'BibleOSISImpl loaded') log.info(u'BibleOSISImpl loaded')
def __init__(self, parent, **kwargs): def __init__(self, parent, **kwargs):

View File

@ -29,6 +29,7 @@ from forms import EditCustomForm
from openlp.core.lib import Plugin, build_icon, PluginStatus from openlp.core.lib import Plugin, build_icon, PluginStatus
from openlp.plugins.custom.lib import CustomManager, CustomMediaItem, CustomTab from openlp.plugins.custom.lib import CustomManager, CustomMediaItem, CustomTab
log = logging.getLogger(__name__)
class CustomPlugin(Plugin): class CustomPlugin(Plugin):
""" """
@ -39,9 +40,6 @@ class CustomPlugin(Plugin):
the songs plugin has become restrictive. Examples could be the songs plugin has become restrictive. Examples could be
Welcome slides, Bible Reading information, Orders of service. Welcome slides, Bible Reading information, Orders of service.
""" """
global log
log = logging.getLogger(u'CustomPlugin')
log.info(u'Custom Plugin loaded') log.info(u'Custom Plugin loaded')
def __init__(self, plugin_helpers): def __init__(self, plugin_helpers):

View File

@ -30,12 +30,12 @@ from editcustomdialog import Ui_customEditDialog
from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver
from openlp.plugins.custom.lib.models import CustomSlide from openlp.plugins.custom.lib.models import CustomSlide
log = logging.getLogger(__name__)
class EditCustomForm(QtGui.QDialog, Ui_customEditDialog): class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
""" """
Class documentation goes here. Class documentation goes here.
""" """
global log
log = logging.getLogger(u'EditCustomForm')
log.info(u'Custom Editor loaded') log.info(u'Custom Editor loaded')
def __init__(self, custommanager, parent = None): def __init__(self, custommanager, parent = None):
""" """

View File

@ -27,14 +27,13 @@ import logging
from openlp.plugins.custom.lib.models import init_models, metadata, CustomSlide from openlp.plugins.custom.lib.models import init_models, metadata, CustomSlide
log = logging.getLogger(__name__)
class CustomManager(): class CustomManager():
""" """
The Song Manager provides a central location for all database code. This The Song Manager provides a central location for all database code. This
class takes care of connecting to the database and running all the queries. class takes care of connecting to the database and running all the queries.
""" """
global log
log = logging.getLogger(u'CustomManager')
log.info(u'Custom manager loaded') log.info(u'Custom manager loaded')
def __init__(self, config): def __init__(self, config):

View File

@ -30,6 +30,8 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, SongXMLParser, BaseListWithDnD,\ from openlp.core.lib import MediaManagerItem, SongXMLParser, BaseListWithDnD,\
Receiver, str_to_bool Receiver, str_to_bool
log = logging.getLogger(__name__)
class CustomListView(BaseListWithDnD): class CustomListView(BaseListWithDnD):
def __init__(self, parent=None): def __init__(self, parent=None):
self.PluginName = u'Custom' self.PluginName = u'Custom'
@ -39,8 +41,6 @@ class CustomMediaItem(MediaManagerItem):
""" """
This is the custom media manager item for Custom Slides. This is the custom media manager item for Custom Slides.
""" """
global log
log = logging.getLogger(u'CustomMediaItem')
log.info(u'Custom Media Item loaded') log.info(u'Custom Media Item loaded')
def __init__(self, parent, icon, title): def __init__(self, parent, icon, title):

View File

@ -28,9 +28,9 @@ import logging
from openlp.core.lib import Plugin, build_icon, PluginStatus from openlp.core.lib import Plugin, build_icon, PluginStatus
from openlp.plugins.images.lib import ImageMediaItem, ImageTab from openlp.plugins.images.lib import ImageMediaItem, ImageTab
log = logging.getLogger(__name__)
class ImagePlugin(Plugin): class ImagePlugin(Plugin):
global log
log = logging.getLogger(u'ImagePlugin')
log.info(u'Image Plugin loaded') log.info(u'Image Plugin loaded')
def __init__(self, plugin_helpers): def __init__(self, plugin_helpers):

View File

@ -29,6 +29,8 @@ import os
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon
log = logging.getLogger(__name__)
# We have to explicitly create separate classes for each plugin # We have to explicitly create separate classes for each plugin
# in order for DnD to the Service manager to work correctly. # in order for DnD to the Service manager to work correctly.
class ImageListView(BaseListWithDnD): class ImageListView(BaseListWithDnD):
@ -40,8 +42,6 @@ class ImageMediaItem(MediaManagerItem):
""" """
This is the custom media manager item for images. This is the custom media manager item for images.
""" """
global log
log = logging.getLogger(u'ImageMediaItem')
log.info(u'Image Media Item loaded') log.info(u'Image Media Item loaded')
def __init__(self, parent, icon, title): def __init__(self, parent, icon, title):

View File

@ -46,15 +46,15 @@ from PyQt4 import QtCore
from presentationcontroller import PresentationController from presentationcontroller import PresentationController
log = logging.getLogger(__name__)
class ImpressController(PresentationController): class ImpressController(PresentationController):
""" """
Class to control interactions with Impress presentations. Class to control interactions with Impress presentations.
It creates the runtime environment, loads and closes the presentation as It creates the runtime environment, loads and closes the presentation as
well as triggering the correct activities based on the users input well as triggering the correct activities based on the users input
""" """
global log log.info(u'ImpressController loaded')
log = logging.getLogger(u'ImpressController')
log.info(u'loaded')
def __init__(self, plugin): def __init__(self, plugin):
""" """

View File

@ -31,6 +31,8 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, BaseListWithDnD from openlp.core.lib import MediaManagerItem, BaseListWithDnD
from openlp.plugins.presentations.lib import MessageListener from openlp.plugins.presentations.lib import MessageListener
log = logging.getLogger(__name__)
# We have to explicitly create separate classes for each plugin # We have to explicitly create separate classes for each plugin
# in order for DnD to the Service manager to work correctly. # in order for DnD to the Service manager to work correctly.
class PresentationListView(BaseListWithDnD): class PresentationListView(BaseListWithDnD):
@ -43,8 +45,6 @@ class PresentationMediaItem(MediaManagerItem):
This is the Presentation media manager item for Presentation Items. This is the Presentation media manager item for Presentation Items.
It can present files using Openoffice It can present files using Openoffice
""" """
global log
log = logging.getLogger(u'PresentationsMediaItem')
log.info(u'Presentations Media Item loaded') log.info(u'Presentations Media Item loaded')
def __init__(self, parent, icon, title, controllers): def __init__(self, parent, icon, title, controllers):

View File

@ -30,13 +30,13 @@ from PyQt4 import QtCore
from openlp.core.lib import Receiver from openlp.core.lib import Receiver
log = logging.getLogger(__name__)
class Controller(object): class Controller(object):
""" """
This is the Presentation listener who acts on events from the slide This is the Presentation listener who acts on events from the slide
controller and passes the messages on the the correct presentation handlers controller and passes the messages on the the correct presentation handlers
""" """
global log
log = logging.getLogger(u'Controller')
log.info(u'Controller loaded') log.info(u'Controller loaded')
def __init__(self, live): def __init__(self, live):
@ -149,8 +149,6 @@ class MessageListener(object):
This is the Presentation listener who acts on events from the slide This is the Presentation listener who acts on events from the slide
controller and passes the messages on the the correct presentation handlers controller and passes the messages on the the correct presentation handlers
""" """
global log
log = logging.getLogger(u'MessageListener')
log.info(u'Message Listener loaded') log.info(u'Message Listener loaded')
def __init__(self, controllers): def __init__(self, controllers):

View File

@ -33,6 +33,8 @@ if os.name == u'nt':
from presentationcontroller import PresentationController from presentationcontroller import PresentationController
log = logging.getLogger(__name__)
# PPT API documentation: # PPT API documentation:
# http://msdn.microsoft.com/en-us/library/aa269321(office.10).aspx # http://msdn.microsoft.com/en-us/library/aa269321(office.10).aspx
@ -42,9 +44,7 @@ class PowerpointController(PresentationController):
It creates the runtime Environment , Loads the and Closes the Presentation It creates the runtime Environment , Loads the and Closes the Presentation
As well as triggering the correct activities based on the users input As well as triggering the correct activities based on the users input
""" """
global log log.info(u'PowerpointController loaded')
log = logging.getLogger(u'PowerpointController')
log.info(u'loaded')
def __init__(self, plugin): def __init__(self, plugin):
""" """

View File

@ -32,15 +32,15 @@ if os.name == u'nt':
from presentationcontroller import PresentationController from presentationcontroller import PresentationController
log = logging.getLogger(__name__)
class PptviewController(PresentationController): class PptviewController(PresentationController):
""" """
Class to control interactions with PowerPOint Viewer Presentations Class to control interactions with PowerPOint Viewer Presentations
It creates the runtime Environment , Loads the and Closes the Presentation It creates the runtime Environment , Loads the and Closes the Presentation
As well as triggering the correct activities based on the users input As well as triggering the correct activities based on the users input
""" """
global log log.info(u'PPTViewController loaded')
log = logging.getLogger(u'PptviewController')
log.info(u'loaded')
def __init__(self, plugin): def __init__(self, plugin):
""" """

View File

@ -31,6 +31,8 @@ from PyQt4 import QtCore
from openlp.core.lib import Receiver from openlp.core.lib import Receiver
log = logging.getLogger(__name__)
class PresentationController(object): class PresentationController(object):
""" """
Base class for presentation controllers to inherit from Base class for presentation controllers to inherit from
@ -116,8 +118,6 @@ class PresentationController(object):
Returns a path to an image containing a preview for the requested slide Returns a path to an image containing a preview for the requested slide
""" """
global log
log = logging.getLogger(u'PresentationController')
log.info(u'PresentationController loaded') log.info(u'PresentationController loaded')
def __init__(self, plugin=None, name=u'PresentationController'): def __init__(self, plugin=None, name=u'PresentationController'):

View File

@ -29,9 +29,9 @@ import logging
from openlp.core.lib import Plugin, build_icon, Receiver, PluginStatus from openlp.core.lib import Plugin, build_icon, Receiver, PluginStatus
from openlp.plugins.presentations.lib import * from openlp.plugins.presentations.lib import *
class PresentationPlugin(Plugin): log = logging.getLogger(__name__)
global log class PresentationPlugin(Plugin):
log = logging.getLogger(u'PresentationPlugin') log = logging.getLogger(u'PresentationPlugin')
def __init__(self, plugin_helpers): def __init__(self, plugin_helpers):

View File

@ -30,10 +30,9 @@ from PyQt4 import QtNetwork, QtCore
from openlp.core.lib import Plugin, Receiver from openlp.core.lib import Plugin, Receiver
from openlp.plugins.remotes.lib import RemoteTab from openlp.plugins.remotes.lib import RemoteTab
class RemotesPlugin(Plugin): log = logging.getLogger(__name__)
global log class RemotesPlugin(Plugin):
log = logging.getLogger(u'RemotesPlugin')
log.info(u'Remote Plugin loaded') log.info(u'Remote Plugin loaded')
def __init__(self, plugin_helpers): def __init__(self, plugin_helpers):

View File

@ -28,14 +28,13 @@ import logging
from openlp.plugins.songs.lib.models import init_models, metadata, Song, \ from openlp.plugins.songs.lib.models import init_models, metadata, Song, \
Author, Topic, Book Author, Topic, Book
log = logging.getLogger(__name__)
class SongManager(): class SongManager():
""" """
The Song Manager provides a central location for all database code. This The Song Manager provides a central location for all database code. This
class takes care of connecting to the database and running all the queries. class takes care of connecting to the database and running all the queries.
""" """
global log
log = logging.getLogger(u'SongManager')
log.info(u'Song manager loaded') log.info(u'Song manager loaded')
def __init__(self, config): def __init__(self, config):

View File

@ -31,6 +31,8 @@ from openlp.core.lib import MediaManagerItem, SongXMLParser, \
BaseListWithDnD, Receiver, str_to_bool BaseListWithDnD, Receiver, str_to_bool
from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm
log = logging.getLogger(__name__)
class SongListView(BaseListWithDnD): class SongListView(BaseListWithDnD):
def __init__(self, parent=None): def __init__(self, parent=None):
self.PluginName = u'Songs' self.PluginName = u'Songs'
@ -40,8 +42,6 @@ class SongMediaItem(MediaManagerItem):
""" """
This is the custom media manager item for Songs. This is the custom media manager item for Songs.
""" """
global log
log = logging.getLogger(u'SongMediaItem')
log.info(u'Song Media Item loaded') log.info(u'Song Media Item loaded')
def __init__(self, parent, icon, title): def __init__(self, parent, icon, title):

View File

@ -32,6 +32,8 @@ from openlp.plugins.songs.lib import SongManager, SongMediaItem, SongsTab
from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \ from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \
OpenSongImportForm, OpenLPExportForm OpenSongImportForm, OpenLPExportForm
log = logging.getLogger(__name__)
class SongsPlugin(Plugin): class SongsPlugin(Plugin):
""" """
This is the number 1 plugin, if importance were placed on any This is the number 1 plugin, if importance were placed on any
@ -40,9 +42,6 @@ class SongsPlugin(Plugin):
specified. Authors, topics and song books can be assigned to songs specified. Authors, topics and song books can be assigned to songs
as well. as well.
""" """
global log
log = logging.getLogger(u'SongsPlugin')
log.info(u'Song Plugin loaded') log.info(u'Song Plugin loaded')
def __init__(self, plugin_helpers): def __init__(self, plugin_helpers):

View File

@ -29,9 +29,9 @@ import logging
from songusagedetaildialog import Ui_SongUsageDetailDialog from songusagedetaildialog import Ui_SongUsageDetailDialog
log = logging.getLogger(__name__)
class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog): class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
global log
log = logging.getLogger(u'SongUsageDetailForm')
log.info(u'SongUsage Detail Form loaded') log.info(u'SongUsage Detail Form loaded')
""" """
Class documentation goes here. Class documentation goes here.

View File

@ -27,14 +27,13 @@ import logging
from openlp.plugins.songusage.lib.models import init_models, metadata, SongUsageItem from openlp.plugins.songusage.lib.models import init_models, metadata, SongUsageItem
log = logging.getLogger(__name__)
class SongUsageManager(): class SongUsageManager():
""" """
The Song Manager provides a central location for all database code. This The Song Manager provides a central location for all database code. This
class takes care of connecting to the database and running all the queries. class takes care of connecting to the database and running all the queries.
""" """
global log
log = logging.getLogger(u'SongUsageManager')
log.info(u'SongUsage manager loaded') log.info(u'SongUsage manager loaded')
def __init__(self, config): def __init__(self, config):

View File

@ -33,9 +33,9 @@ from openlp.plugins.songusage.lib import SongUsageManager
from openlp.plugins.songusage.forms import SongUsageDetailForm, SongUsageDeleteForm from openlp.plugins.songusage.forms import SongUsageDetailForm, SongUsageDeleteForm
from openlp.plugins.songusage.lib.models import SongUsageItem from openlp.plugins.songusage.lib.models import SongUsageItem
log = logging.getLogger(__name__)
class SongUsagePlugin(Plugin): class SongUsagePlugin(Plugin):
global log
log = logging.getLogger(u'SongUsagePlugin')
log.info(u'SongUsage Plugin loaded') log.info(u'SongUsage Plugin loaded')
def __init__(self, plugin_helpers): def __init__(self, plugin_helpers):