diff --git a/app/daemon.go b/app/daemon.go index 40b4d0b..87b01ce 100644 --- a/app/daemon.go +++ b/app/daemon.go @@ -174,7 +174,7 @@ func Daemon(confFilename string) { logs = make(chan LogEntry) flushes = make(chan LogEntry) - go conf.DatabaseManager() + go DatabaseManager(conf) // Ready to start diff --git a/app/persist.go b/app/persist.go index 0ab3d51..ed400eb 100644 --- a/app/persist.go +++ b/app/persist.go @@ -45,7 +45,7 @@ func createDB(path string) *WriteDB { return &WriteDB{file, gob.NewEncoder(file)} } -func (c *Conf) DatabaseManager() { +func DatabaseManager(c *Conf) { logDB, flushDB := c.RotateDB(true) c.manageLogs(logDB, flushDB) }