package mq import ( "context" "fmt" "git.diulo.com/mogfee/protoc-gen-kit/log" "testing" ) func Test_nsqLogger_Log(t *testing.T) { nsqWriter := NewNsqLogger("localhost:4150", "app_log") nsqWriter.Start() logger := log.With(nsqWriter, "ts", log.DefaultTimestamp, "caller", log.DefaultCaller, ) logger.Log(log.LevelInfo, "user name ttt") fmt.Println(nsqWriter.Shutdown(context.Background())) }