package xmpp import ( "log" ) type logger struct { prefix string } func (l logger) Write(p []byte) (n int, err error) { log.Printf("%s%s", l.prefix, string(p)) return len(p), nil }