fix: inject propagator header

feat: set error tag as true
fix: unit test issue
fix: deep source check error
This commit is contained in:
hezhaoyang
2022-04-18 20:55:55 +08:00
parent 684d4e030b
commit d98ab11096
3 changed files with 10 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ import (
type CustomFormatter struct{}
func (c *CustomFormatter) Format(lm *LogMsg) string {
func (*CustomFormatter) Format(lm *LogMsg) string {
return "hello, msg: " + lm.Msg
}
@@ -49,15 +49,15 @@ func (t *TestLogger) WriteMsg(lm *LogMsg) error {
return nil
}
func (t *TestLogger) Destroy() {
func (*TestLogger) Destroy() {
panic("implement me")
}
func (t *TestLogger) Flush() {
func (*TestLogger) Flush() {
panic("implement me")
}
func (t *TestLogger) SetFormatter(f LogFormatter) {
func (*TestLogger) SetFormatter(_ LogFormatter) {
panic("implement me")
}
@@ -77,7 +77,7 @@ func TestPatternLogFormatter(t *testing.T) {
Pattern: "%F:%n|%w%t>> %m",
WhenFormat: "2006-01-02",
}
when := time.Now()
when, _ := time.Parse(tes.WhenFormat, "2022-04-17")
testCases := []struct {
msg *LogMsg
want string