last minute fixes

This commit is contained in:
Michel Oosterhof
2015-04-30 20:59:52 +00:00
parent 8ef41d6d23
commit 13438caf70
2 changed files with 7 additions and 6 deletions

View File

@@ -66,7 +66,7 @@ class Output(object):
else:
self.sensor = socket.gethostname()
self.start(cfg)
self.start()
# use logDispatch when the HoneypotTransport prefix is not available.
# here you can explicitly set the sessionIds to tie the sessions together

View File

@@ -36,13 +36,14 @@ import kippo.core.output
class Output(kippo.core.output.Output):
def __init__(self, cfg):
self.outfile = None
def start(self, cfg):
kippo.core.output.Output.__init__(self, cfg)
fn = cfg.get('output_jsonlog', 'logfile')
dir = os.path.dirname(fn)
dirs = os.path.dirname(fn)
base = os.path.basename(fn)
self.outfile = twisted.python.logfile.DailyLogFile(base, dir)
self.outfile = twisted.python.logfile.DailyLogFile(base, dirs)
def start(self):
pass
def stop(self):
self.outfile.close()