syslog writing works

This commit is contained in:
2026-01-12 17:43:06 +01:00
parent 306535c933
commit cdf6a6c44a
7 changed files with 269 additions and 127 deletions

View File

@@ -7,13 +7,14 @@ import (
)
type Message struct {
Time time.Time
Topic string
Payload string
Time time.Time `json:"time"`
Topic string `json:"topic"`
Payload string `json:"payload"`
}
func InitArchiver() {
log.Printf("Archiver initializing")
InitSyslog()
}
func InputArchiver() {
@@ -25,4 +26,6 @@ func InputArchiver() {
func handleMessage(message Message) {
log.Printf("Archiving Timestamp: %s, Topic: %s, Payload: %s", message.Time, message.Topic, message.Payload)
WriteSyslog(message)
}