log

package
v0.0.0-...-8d2d120 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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 Fatal

func Fatal(args ...interface{})

使用すると強制終了するので注意

func Fatalf

func Fatalf(template string, args ...interface{})

使用すると強制終了するので注意

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()

func Warning

func Warning(args ...interface{})
Example
Warning(strVal, intVal, errVal, arrayVal, structVal)
Output:

2022-05-20T17:10:30.000Z	WARN	Log/Log_test.go:51	str1 <nil> [1 2] {1 s}

func Warningf

func Warningf(template string, args ...interface{})
Example
Warningf("%s %d %v %v %v", strVal, intVal, errVal, arrayVal, structVal)
Output:

2022-05-20T17:10:30.000Z	WARN	Log/Log_test.go:75	str 1 <nil> [1 2] {1 s}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL