You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
407 B

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