-
Notifications
You must be signed in to change notification settings - Fork 5
/
output.go
39 lines (31 loc) · 940 Bytes
/
output.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
package logify
import "os"
// Infof writes an info message
func Infof(format string, args ...interface{}) {
log(Info, "", format, args...)
}
// Warningf writes a warning message
func Warningf(format string, args ...interface{}) {
log(Warning, "", format, args...)
}
// Errorf writes an error message
func Errorf(format string, args ...interface{}) {
log(Error, "", format, args...)
}
// Debugf writes a debug message
func Debugf(format string, args ...interface{}) {
log(Debug, "", format, args...)
}
// Verbosef writes a verbose message
func Verbosef(format string, label string, args ...interface{}) {
log(Verbose, label, format, args...)
}
// Silentf writes a message with no label
func Silentf(format string, args ...interface{}) {
log(Silent, "", format, args...)
}
// Fatalf exits the program after logging a fatal message
func Fatalf(format string, args ...interface{}) {
log(Fatal, "", format, args...)
os.Exit(1)
}