Skip to content
Snippets Groups Projects
Verified Commit d43a591d authored by blallo's avatar blallo
Browse files

Add prefix to logs

parent 9101b7a0
No related branches found
No related tags found
No related merge requests found
......@@ -14,11 +14,17 @@ import (
var (
port = flag.Int("port", 4041, "A port to bind to on the specified addresses")
service = flag.String("service", "xmpp", "Service to use for authentication")
prefix = flag.String("prefix", "", "Name to use in logs")
)
func main() {
flag.Parse()
if *prefix != "" {
p := *prefix + ": "
log.SetPrefix(p)
}
log.Printf("Starting on 127.0.0.1:%d\n", *port)
http.HandleFunc("/", authHandlerFunc)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment