优化error的日志打印
This commit is contained in:
@@ -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 {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user