-
Notifications
You must be signed in to change notification settings - Fork 0
/
stdlogger.go
27 lines (24 loc) · 1.13 KB
/
stdlogger.go
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
package alog
// StdLogger is an interface implemented by both alog.Logger and stdlib
// log.Logger. This allows both implementations to be used interchangeably.
type StdLogger interface {
// Print, Println, and Printf log a message. Arguments are handled in the
// manner of fmt.Print, fmt.Println, and fmt.Printf respectively.
Print(v ...interface{})
Println(v ...interface{})
Printf(format string, v ...interface{})
// Fatal, Fatalln, and Fatalf log a message and then call os.Exit(1).
// Arguments are handled in the manner of fmt.Print, fmt.Println, and
// fmt.Printf respectively. These are provided to allow alog.Logger to
// serve as a replacement for stdlib log.Logger.
Fatal(v ...interface{})
Fatalln(v ...interface{})
Fatalf(format string, v ...interface{})
// Panic, Panicln, and Panicf log a message and then call panic() with the
// message. Arguments are handled in the manner of fmt.Print, fmt.Println,
// and fmt.Printf respectively. These are provided to allow alog.Logger to
// serve as a replacement for stdlib log.Logger.
Panic(v ...interface{})
Panicln(v ...interface{})
Panicf(format string, v ...interface{})
}