优化error的日志打印

This commit is contained in:
yun
2024-07-26 17:52:32 +08:00
parent 1abd260929
commit 079aa77938
2 changed files with 15 additions and 0 deletions
+9
View File
@@ -3,6 +3,7 @@ package loggerx_test
import (
"bytes"
"context"
"errors"
"fmt"
"testing"
"time"
@@ -38,6 +39,14 @@ func TestLogger(t *testing.T) {
time.Sleep(time.Second * 5)
}
func TestLogger2(t *testing.T) {
err := errors.New("test error")
loggerx.Info(context.Background(), err)
}
type Print struct {
}