-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwarn.go
35 lines (29 loc) · 817 Bytes
/
warn.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
package logkit
// Warn :
func Warn(format string, v ...any) {
logger(2, WARN, format+"%v", append(v, fEf(""))...)
}
// WarnOnErr : write error into Console OR File
func WarnOnErr(format string, v ...any) {
logger(2, WARN, format, v...)
}
// WarnOnErrWhen : write error into Console OR File
func WarnOnErrWhen(condition bool, format string, v ...any) {
if condition {
logger(2, WARN, format, v...)
}
}
// WarnP1 :
func WarnP1(format string, v ...any) {
logger(3, WARN, format+"%v", append(v, fEf(""))...)
}
// WarnP1OnErr : write error into Console OR File
func WarnP1OnErr(format string, v ...any) {
logger(3, WARN, format, v...)
}
// WarnP1OnErrWhen : write error into Console OR File
func WarnP1OnErrWhen(condition bool, format string, v ...any) {
if condition {
logger(3, WARN, format, v...)
}
}