1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

store log are now written to database folder

This commit is contained in:
postmannen 2023-01-06 12:19:36 +01:00
parent a95c36f0c3
commit bcc5db7c04

View file

@ -536,7 +536,8 @@ func (r *ringBuffer) dbUpdate(db *bolt.DB, bucket string, key string, value []by
// To store a message in the store, send what to store on the
// ringbuffer.permStore channel.
func (r *ringBuffer) startPermanentStore(ctx context.Context) {
const storeFile string = "store.log"
storeFile := filepath.Join(r.configuration.DatabaseFolder, "store.log")
f, err := os.OpenFile(storeFile, os.O_APPEND|os.O_RDWR|os.O_CREATE, 0600)
if err != nil {
log.Printf("error: startPermanentStore: failed to open file: %v\n", err)