forked from boyska/circolog
print info
This commit is contained in:
parent
432d46d15f
commit
ed98e951d4
1 changed files with 5 additions and 1 deletions
6
main.go
6
main.go
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue