print info

This commit is contained in:
boyska 2018-08-22 21:05:37 +02:00
parent 432d46d15f
commit ed98e951d4

View file

@ -48,14 +48,18 @@ func main() {
server.SetHandler(handler)
if *syslogSocketPath != "" {
server.ListenUnixgram(*syslogSocketPath)
fmt.Printf("Binding socket `%s` [syslog]\n", *syslogSocketPath)
} else {
server.ListenUDP("127.0.0.1:9514")
addr := "127.0.0.1:9514"
fmt.Printf("Binding address `%s` [syslog]\n", addr)
server.ListenUDP(addr)
}
circbuf = ring.New(*bufsize)
server.Boot()
go syslogdHandler(channel)
http.HandleFunc("/", httpHandler)
fmt.Printf("Binding address `%s` [http]\n", ":9080")
http.ListenAndServe(":9080", nil)
server.Wait()