-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlevels.go
37 lines (29 loc) · 1017 Bytes
/
levels.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
28
29
30
31
32
33
34
35
36
37
package logg
type Levels interface {
ErrorLevel
WarningLevel
InfoLevel
PanicLevel
}
type ErrorLevel interface {
//Error format to an error log and send to some writer
Error(patter string, args ...interface{})
//SyncError run in concurrency, format to an error log and send to some writer
SyncError(patter string, args ...interface{})
}
type WarningLevel interface {
//Warning format to a warning log and send to some writer
Warning(patter string, args ...interface{})
//SyncWarning run in concurrency, format to a warning log and send to some writer
SyncWarning(patter string, args ...interface{})
}
type PanicLevel interface {
//Panic format to a PANIC log and send to some writer, after it runs os.Exit
Panic(patter string, args ...interface{})
}
type InfoLevel interface {
//Info format to a info log and send to some writer
Info(patter string, args ...interface{})
//SyncInfo run in concurrency, format to a info log and send to some writer
SyncInfo(patter string, args ...interface{})
}