1 // (c) Bernhard Tittelbach, 2013
9 type NullWriter struct {}
10 func (n *NullWriter) Write(p []byte) (int, error) {return len(p),nil}
18 Syslog_ = log.New(&NullWriter{}, "", 0)
19 Debug_ = log.New(&NullWriter{}, "", 0)
22 func LogEnableSyslog() {
24 Syslog_, logerr = syslog.NewLogger(syslog.LOG_INFO | (18<<3), 0)
25 if logerr != nil { panic(logerr) }
28 func LogEnableDebuglog() {
29 Syslog_ = log.New(os.Stdout, "", log.LstdFlags)
30 Debug_ = log.New(os.Stderr, "DEBUG ", log.LstdFlags)