X-Git-Url: https://git.realraum.at/?p=svn42.git;a=blobdiff_plain;f=go%2Fr3-netstatus%2Fr3xmppbot%2Flogging.go;h=e4d2998b7a2405a764f79a665093128a6e6a2ad8;hp=d8ae7f66046a2f3ac2cafa4f720d64773578bbc6;hb=762ecd62c9bca5d9a4c9696dcf477d1000a28f42;hpb=114821ef8e7567df37044ecd77b4d807216b0946 diff --git a/go/r3-netstatus/r3xmppbot/logging.go b/go/r3-netstatus/r3xmppbot/logging.go index d8ae7f6..e4d2998 100644 --- a/go/r3-netstatus/r3xmppbot/logging.go +++ b/go/r3-netstatus/r3xmppbot/logging.go @@ -28,4 +28,26 @@ func LogEnableSyslog() { func LogEnableDebuglog() { Syslog_ = log.New(os.Stdout, "", log.LstdFlags) Debug_ = log.New(os.Stderr, "DEBUG ", log.LstdFlags) +} + +type XMPPLogger struct { +} + +func (s *XMPPLogger) Log(v ...interface{}) { + Syslog_.Println(v...) +} + +func (s *XMPPLogger) Logf(fmt string, v ...interface{}) { + Syslog_.Printf(fmt, v...) +} + +type XMPPDebugLogger struct { +} + +func (s *XMPPDebugLogger) Log(v ...interface{}) { + Debug_.Println(v...) +} + +func (s *XMPPDebugLogger) Logf(fmt string, v ...interface{}) { + Debug_.Printf(fmt, v...) } \ No newline at end of file