Exemple #1
0
 def init_watcher(self):
     try:
         self.watcher = LogWatcher(parent=self, log=self.log)
     except:
         self.log.error("Couldn't start the LogWatcher", exc_info=True)
         self.exit(1)
     self.log.info("Listening for log messages on %r" % self.watcher.url)
Exemple #2
0
class IPLoggerApp(BaseParallelApplication):

    name = u'iplogger'
    description = _description
    classes = [LogWatcher, ProfileDir]
    aliases = Dict(aliases)

    @catch_config_error
    def initialize(self, argv=None):
        super(IPLoggerApp, self).initialize(argv)
        self.init_watcher()

    def init_watcher(self):
        try:
            self.watcher = LogWatcher(parent=self, log=self.log)
        except:
            self.log.error("Couldn't start the LogWatcher", exc_info=True)
            self.exit(1)
        self.log.info("Listening for log messages on %r" % self.watcher.url)

    def start(self):
        self.watcher.start()
        try:
            self.watcher.loop.start()
        except KeyboardInterrupt:
            self.log.critical("Logging Interrupted, shutting down...\n")
class IPLoggerApp(BaseParallelApplication):

    name = u'iplogger'
    description = _description
    classes = [LogWatcher, ProfileDir]
    aliases = Dict(aliases)

    @catch_config_error
    def initialize(self, argv=None):
        super(IPLoggerApp, self).initialize(argv)
        self.init_watcher()
    
    def init_watcher(self):
        try:
            self.watcher = LogWatcher(parent=self, log=self.log)
        except:
            self.log.error("Couldn't start the LogWatcher", exc_info=True)
            self.exit(1)
        self.log.info("Listening for log messages on %r"%self.watcher.url)
        

    def start(self):
        self.watcher.start()
        try:
            self.watcher.loop.start()
        except KeyboardInterrupt:
            self.log.critical("Logging Interrupted, shutting down...\n")
 def init_watcher(self):
     try:
         self.watcher = LogWatcher(parent=self, log=self.log)
     except:
         self.log.error("Couldn't start the LogWatcher", exc_info=True)
         self.exit(1)
     self.log.info("Listening for log messages on %r"%self.watcher.url)