package main import ( "fmt" "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" "github.com/edgexfoundry/go-mod-core-contracts/v2/models" ) const MAXRWLEN = 8000 func main() { var tmpstr string = "123" lc := logger.NewClient("test", models.ErrorLog) //lc := logger.MockLogger{} lc.Errorf("Error %d ...", 1234) //打印输出读到的信息 fmt.Println(tmpstr) return }这是
EdgeX中的Log日志使用方法
输出结果: