syslog writing works
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user