Skip to content

Commit

Permalink
use new log
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxiujia committed May 16, 2022
1 parent 65bcb9c commit 4d2efb1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions LogStandard_test.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
package GoMybatis

import (
"fmt"
"log"
"testing"
)

func TestLogStandard_Println(t *testing.T) {
var stand = LogStandard{}
//没有设置func,使用系统log打印
stand.Println([]byte("hello"))
stand.Println("hello")

//设置func,使用func打印
stand.PrintlnFunc = func(v []byte) {
log.Println(string(v), "println on PrintlnFunc()")
stand.PrintlnFunc = func(v ...string) {
log.Println(fmt.Sprint(v))
}

stand.Println([]byte("hello"))
stand.Println("hello")
}

0 comments on commit 4d2efb1

Please sign in to comment.