[internal/logging] add logging lib

This commit is contained in:
2023-11-03 14:32:27 +01:00
parent 7256763c20
commit 2a530681df
21 changed files with 148 additions and 61 deletions

View File

@@ -3,7 +3,6 @@ package triggers
import (
"encoding/json"
"errors"
"fmt"
"os"
"time"
@@ -35,8 +34,8 @@ func (t UsbDisconnect) Listen() {
time.Sleep(1 * time.Second)
}
fmt.Printf("Device %s detected.\n", t.DeviceName)
fmt.Println("UsbDisconnect Trigger is Armed")
internal.LogDoc(t).Infof("Device %s detected.\n", t.DeviceName)
internal.LogDoc(t).Notice("Trigger is Armed")
}
for {