twisted/plugins/fixbot_logwatch_plugin.py
author Tero Marttila <terom@fixme.fi>
Fri, 05 Feb 2010 22:20:59 +0200
changeset 59 43806d334fb4
parent 47 81b37185209c
child 62 e4db89a5f6bc
permissions -rw-r--r--
prepend source name to output type
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
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)

serviceMaker = MyServiceMaker()