Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func SetStacktrace()
- func UnsetStacktrace()
- func Warning(args ...interface{})
- func Warningf(template string, args ...interface{})
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(args ...interface{})
Example ¶
NOTE: fatalレベルのログを出すとexit(1)されてテストが落ちるのでfatalだけ除外
Debug(strVal, intVal, errVal, arrayVal, structVal)
Output: 2022-05-20T17:10:30.000Z DEBUG Log/Log_test.go:39 str1 <nil> [1 2] {1 s}
func Debugf ¶
func Debugf(template string, args ...interface{})
Example ¶
Debugf("%s %d %v %v %v", strVal, intVal, errVal, arrayVal, structVal)
Output: 2022-05-20T17:10:30.000Z DEBUG Log/Log_test.go:63 str 1 <nil> [1 2] {1 s}
func Error ¶
func Error(args ...interface{})
Example ¶
Error(strVal, intVal, errVal, arrayVal, structVal)
Output: 2022-05-20T17:10:30.000Z ERROR Log/Log_test.go:57 str1 <nil> [1 2] {1 s}
func Errorf ¶
func Errorf(template string, args ...interface{})
Example ¶
Errorf("%s %d %v %v %v", strVal, intVal, errVal, arrayVal, structVal)
Output: 2022-05-20T17:10:30.000Z ERROR Log/Log_test.go:81 str 1 <nil> [1 2] {1 s}
func Info ¶
func Info(args ...interface{})
Example ¶
Info(strVal, intVal, errVal, arrayVal, structVal)
Output: 2022-05-20T17:10:30.000Z INFO Log/Log_test.go:45 str1 <nil> [1 2] {1 s}
func Infof ¶
func Infof(template string, args ...interface{})
Example ¶
Infof("%s %d %v %v %v", strVal, intVal, errVal, arrayVal, structVal)
Output: 2022-05-20T17:10:30.000Z INFO Log/Log_test.go:69 str 1 <nil> [1 2] {1 s}
func SetStacktrace ¶
func SetStacktrace()
func UnsetStacktrace ¶
func UnsetStacktrace()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.