forked from mongodb/grip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrorLogging.go
75 lines (56 loc) · 1.36 KB
/
errorLogging.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Catch Logging
//
// Logging helpers for catching and logging error messages. Helpers exist
// for the following levels, with helpers defined both globally for the
// global logger and for Journaler logging objects.
package grip
import "github.com/mongodb/grip/level"
// Emergency + (fatal/panic)
// Alert + (fatal/panic)
// Critical + (fatal/panic)
// Error + (fatal/panic)
// Warning
// Notice
// Info
// Debug
func CatchLog(l level.Priority, err error) {
std.CatchLog(l, err)
}
// Level Emergency Catcher Logging Helpers
func CatchEmergency(err error) {
std.CatchEmergency(err)
}
func CatchEmergencyPanic(err error) {
std.CatchEmergency(err)
}
func CatchEmergencyFatal(err error) {
std.CatchEmergencyFatal(err)
}
// Level Alert Catcher Logging Helpers
func CatchAlert(err error) {
std.CatchAlert(err)
}
// Level Critical Catcher Logging Helpers
func CatchCritical(err error) {
std.CatchCritical(err)
}
// Level Error Catcher Logging Helpers
func CatchError(err error) {
std.CatchError(err)
}
// Level Warning Catcher Logging Helpers
func CatchWarning(err error) {
std.CatchWarning(err)
}
// Level Notice Catcher Logging Helpers
func CatchNotice(err error) {
std.CatchNotice(err)
}
// Level Info Catcher Logging Helpers
func CatchInfo(err error) {
std.CatchInfo(err)
}
// Level Debug Catcher Logging Helpers
func CatchDebug(err error) {
std.CatchDebug(err)
}