xmpp.go
branchgo.weekly.2012-01-15
changeset 93 fbd51fa6b7ea
parent 81 a74e7fc4ecee
--- a/xmpp.go	Mon Jan 23 21:58:53 2012 -0700
+++ b/xmpp.go	Sun Apr 15 11:20:55 2012 -0600
@@ -14,7 +14,6 @@
 	"fmt"
 	"io"
 	"log"
-	"log/syslog"
 	"net"
 	"sync"
 )
@@ -37,12 +36,26 @@
 	clientSrv = "xmpp-client"
 )
 
+// This is copied from log/syslog, because that's not implemented on
+// Windows.
+type Priority int
+const (
+	LOG_EMERG Priority = iota
+	LOG_ALERT
+	LOG_CRIT
+	LOG_ERR
+	LOG_WARNING
+	LOG_NOTICE
+	LOG_INFO
+	LOG_DEBUG
+)
+
 var (
 	// If non-nil when NewClient() is called, log messages will be
 	// sent to this writer.
 	Log *log.Logger
 	// Threshold for which messages are logged.
-	Loglevel syslog.Priority = syslog.LOG_NOTICE
+	Loglevel Priority = LOG_NOTICE
 	// Use this Config to negotiate TLS connections.
 	TLSConfig *tls.Config = nil
 )