forked from vjeantet/ldapserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogger.go
More file actions
33 lines (26 loc) · 636 Bytes
/
logger.go
File metadata and controls
33 lines (26 loc) · 636 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package ldapserver
import (
"io/ioutil"
"log"
"os"
)
var Logger logger
// Logger represents log.Logger functions from the standard library
type logger interface {
Fatal(v ...interface{})
Fatalf(format string, v ...interface{})
Fatalln(v ...interface{})
Panic(v ...interface{})
Panicf(format string, v ...interface{})
Panicln(v ...interface{})
Print(v ...interface{})
Printf(format string, v ...interface{})
Println(v ...interface{})
}
func init() {
Logger = log.New(os.Stdout, "", log.LstdFlags)
}
var (
// DiscardingLogger can be used to disable logging output
DiscardingLogger = log.New(ioutil.Discard, "", 0)
)