@@ -15,38 +15,38 @@ func TestEntry_WithFields(t *testing.T) {
1515
1616 c := a .WithFields (Fields {{"foo" , "hello" }, {"bar" , "world" }})
1717 d := c .WithFields (Fields {{"baz" , "jazz" }})
18- qt .Assert (t , b .distinctFieldsLastByName () , qt .DeepEquals , Fields {{"foo" , "bar" }})
19- qt .Assert (t , c .distinctFieldsLastByName () , qt .DeepEquals , Fields {{"foo" , "hello" }, {"bar" , "world" }})
20- qt .Assert (t , d .distinctFieldsLastByName () , qt .DeepEquals , Fields {{"foo" , "hello" }, {"bar" , "world" }, {"baz" , "jazz" }})
18+ qt .Assert (t , b .Fields , qt .DeepEquals , Fields {{"foo" , "bar" }})
19+ qt .Assert (t , c .Fields , qt .DeepEquals , Fields {{"foo" , "hello" }, {"bar" , "world" }})
20+ qt .Assert (t , d .Fields , qt .DeepEquals , Fields {{"foo" , "hello" }, {"bar" , "world" }, {"baz" , "jazz" }})
2121
22- e := c .finalize ("upload" )
22+ /* e := c.finalize("upload")
2323 qt.Assert(t, "upload", qt.Equals, e.Message)
2424 qt.Assert(t, Fields{{"foo", "hello"}, {"bar", "world"}}, qt.DeepEquals, e.Fields)
2525 qt.Assert(t, InfoLevel, qt.Equals, e.Level)
26- qt .Assert (t , time .Now ().IsZero (), qt .IsFalse )
26+ qt.Assert(t, time.Now().IsZero(), qt.IsFalse)*/
2727}
2828
2929func TestEntry_WithField (t * testing.T ) {
3030 a := NewLogger (LoggerConfig {Handler : NoopHandler , Level : InfoLevel }).WithLevel (InfoLevel )
3131 b := a .WithField ("foo" , "baz" ).WithField ("foo" , "bar" )
32- qt .Assert (t , a .distinctFieldsLastByName () , qt .IsNil )
33- qt .Assert (t , b .distinctFieldsLastByName () , qt .DeepEquals , Fields {{"foo" , "bar" }})
32+ qt .Assert (t , a .Fields , qt .IsNil )
33+ qt .Assert (t , b .Fields , qt .DeepEquals , Fields {{"foo" , "bar" }})
3434}
3535
3636func TestEntry_WithError (t * testing.T ) {
3737 a := NewLogger (LoggerConfig {Handler : NoopHandler , Level : InfoLevel }).WithLevel (InfoLevel )
3838 b := a .WithError (fmt .Errorf ("boom" ))
39- qt .Assert (t , a .distinctFieldsLastByName () , qt .IsNil )
40- qt .Assert (t , b .distinctFieldsLastByName () , qt .DeepEquals , Fields {{"error" , "boom" }})
39+ qt .Assert (t , a .Fields , qt .IsNil )
40+ qt .Assert (t , b .Fields , qt .DeepEquals , Fields {{"error" , "boom" }})
4141}
4242
4343func TestEntry_WithError_fields (t * testing.T ) {
4444 a := NewLogger (LoggerConfig {Handler : NoopHandler , Level : InfoLevel }).WithLevel (InfoLevel )
4545 b := a .WithError (errFields ("boom" ))
46- qt .Assert (t , a .distinctFieldsLastByName () , qt .IsNil )
46+ qt .Assert (t , a .Fields , qt .IsNil )
4747 qt .Assert (t ,
4848
49- b .distinctFieldsLastByName () , qt .DeepEquals , Fields {
49+ b .Fields , qt .DeepEquals , Fields {
5050 {"error" , "boom" },
5151 {"reason" , "timeout" },
5252 })
@@ -56,14 +56,14 @@ func TestEntry_WithError_fields(t *testing.T) {
5656func TestEntry_WithError_nil (t * testing.T ) {
5757 a := NewLogger (LoggerConfig {Handler : NoopHandler , Level : InfoLevel }).WithLevel (InfoLevel )
5858 b := a .WithError (nil )
59- qt .Assert (t , a .distinctFieldsLastByName () , qt .IsNil )
60- qt .Assert (t , b .distinctFieldsLastByName () , qt .IsNil )
59+ qt .Assert (t , a .Fields , qt .IsNil )
60+ qt .Assert (t , b .Fields , qt .IsNil )
6161}
6262
6363func TestEntry_WithDuration (t * testing.T ) {
6464 a := NewLogger (LoggerConfig {Handler : NoopHandler , Level : InfoLevel }).WithLevel (InfoLevel )
6565 b := a .WithDuration (time .Second * 2 )
66- qt .Assert (t , b .distinctFieldsLastByName () , qt .DeepEquals , Fields {{"duration" , int64 (2000 )}})
66+ qt .Assert (t , b .Fields , qt .DeepEquals , Fields {{"duration" , int64 (2000 )}})
6767}
6868
6969type errFields string
0 commit comments