github.com/jxskiss/gopkg@v0.17.3/zlog/logger_test.go (about) 1 package zlog 2 3 import "testing" 4 5 func TestStdLogger(t *testing.T) { 6 7 // By default, StdLogger is configured at info level (as the global 8 // loggers), so this debug message won't be logged. 9 // You may use SetupGlobals to configure the global loggers. 10 StdLogger.Debugf("some debug message, %v, %v", "abc", "123") 11 12 // The following messages will be logged by default. 13 StdLogger.Infof("some info message, %v, %v", "abc", "123") 14 StdLogger.Warnf("some warn message, %v, %v", "abc", "123") 15 StdLogger.Errorf("some error message, %v, %v", "abc", "123") 16 17 // Fatalf will log the message and exit the program. 18 // StdLogger.Fatalf("some fatal message, %v, %v", "abc", "123") 19 }