mirror of
https://github.com/nikoksr/notify.git
synced 2024-12-10 10:10:24 +02:00
33 lines
612 B
Go
33 lines
612 B
Go
/*
|
|
Package syslog provides message notification integration for local or remote syslogs.
|
|
|
|
Usage:
|
|
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"log"
|
|
|
|
sl "log/syslog"
|
|
|
|
"github.com/nikoksr/notify"
|
|
"github.com/nikoksr/notify/service/syslog"
|
|
)
|
|
|
|
func main() {
|
|
syslogSvc, err := syslog.New(sl.LOG_USER, "")
|
|
if err != nil {
|
|
log.Fatalf("syslog.New() failed: %v", err)
|
|
}
|
|
|
|
notify.UseServices(syslogSvc)
|
|
|
|
err = notify.Send(context.Background(), "TEST", "Hello, World!")
|
|
if err != nil {
|
|
log.Fatalf("notify.Send() failed: %v", err)
|
|
}
|
|
}
|
|
*/
|
|
package syslog
|