diff options
Diffstat (limited to 'xmpp/log.go')
-rw-r--r-- | xmpp/log.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xmpp/log.go b/xmpp/log.go new file mode 100644 index 0000000..4ac0f88 --- /dev/null +++ b/xmpp/log.go @@ -0,0 +1,15 @@ +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 +} |