twisted/plugins/fixbot_logwatch_plugin.py
author Tero Marttila <terom@fixme.fi>
Sat, 20 Feb 2010 23:06:43 +0200
changeset 64 8574aeff9b36
parent 62 e4db89a5f6bc
permissions -rw-r--r--
blind error handling tweaks
from zope.interface import implements

from twisted.python import usage
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker

from twisted.application import internet

from fixbot import api, module
from fixbot import logwatch

class LogwatchOptions (api.ClientOptions) :
    optParameters = [
        ("logwatch-sources",    None,   None,   "See etc/fixbot-logwatch.py"),
    ]

    optFlags = [

    ]
    
class MyServiceMaker (object) :
    implements(IServiceMaker, IPlugin)
    tapname = "fixbot-logwatch"
    description = "FixBot (Logwatcher component)"
    options = LogwatchOptions

    def makeService (self, config) :
        return logwatch.makeService(config, api.amp.ClientProtocol)

serviceMaker = MyServiceMaker()