@@ -119,7 +119,7 @@ func TestLogger_Importantw_dev(t *testing.T) {
119
119
c .Info (ctx , "hello!" , "foo" , 1 )
120
120
c .Important (ctx , "account created" , "foo" , 1 )
121
121
122
- assert .Equal (t , "<stripped>\t INFO\t zapctxd/logger_test.go:121 \t account created\t {\" foo\" : 1}\n " , w .String ())
122
+ assert .Equal (t , "<stripped>\t INFO\t zapctxd/logger_test.go:120 \t account created\t {\" foo\" : 1}\n " , w .String ())
123
123
}
124
124
125
125
func TestLogger_ColoredOutput_dev (t * testing.T ) {
@@ -138,7 +138,7 @@ func TestLogger_ColoredOutput_dev(t *testing.T) {
138
138
c .Info (ctx , "hello!" , "foo" , 1 )
139
139
c .Important (ctx , "account created" , "foo" , 1 )
140
140
141
- assert .Equal (t , "<stripped>\t \u001B [34mINFO\u001B [0m\t zapctxd/logger_test.go:140 \t account created\t {\" foo\" : 1}\n " , w .String ())
141
+ assert .Equal (t , "<stripped>\t \u001B [34mINFO\u001B [0m\t zapctxd/logger_test.go:139 \t account created\t {\" foo\" : 1}\n " , w .String ())
142
142
}
143
143
144
144
func TestNew_atomic_dev (t * testing.T ) {
@@ -163,20 +163,20 @@ func TestNew_atomic_dev(t *testing.T) {
163
163
c .Important (ctx , "msg" , "lvl" , lvl , "important" , true )
164
164
}
165
165
166
- assert .Equal (t , `<stripped> ERROR zapctxd/logger_test.go:163 msg {"lvl": "error"}
167
- <stripped> INFO zapctxd/logger_test.go:164 msg {"lvl": "error", "important": true}
168
- <stripped> WARN zapctxd/logger_test.go:162 msg {"lvl": "warn"}
169
- <stripped> ERROR zapctxd/logger_test.go:163 msg {"lvl": "warn"}
170
- <stripped> INFO zapctxd/logger_test.go:164 msg {"lvl": "warn", "important": true}
171
- <stripped> INFO zapctxd/logger_test.go:161 msg {"lvl": "info"}
172
- <stripped> WARN zapctxd/logger_test.go:162 msg {"lvl": "info"}
173
- <stripped> ERROR zapctxd/logger_test.go:163 msg {"lvl": "info"}
174
- <stripped> INFO zapctxd/logger_test.go:164 msg {"lvl": "info", "important": true}
175
- <stripped> DEBUG zapctxd/logger_test.go:160 msg {"lvl": "debug"}
176
- <stripped> INFO zapctxd/logger_test.go:161 msg {"lvl": "debug"}
177
- <stripped> WARN zapctxd/logger_test.go:162 msg {"lvl": "debug"}
178
- <stripped> ERROR zapctxd/logger_test.go:163 msg {"lvl": "debug"}
179
- <stripped> INFO zapctxd/logger_test.go:164 msg {"lvl": "debug", "important": true}
166
+ assert .Equal (t , `<stripped> ERROR zapctxd/logger_test.go:162 msg {"lvl": "error"}
167
+ <stripped> INFO zapctxd/logger_test.go:163 msg {"lvl": "error", "important": true}
168
+ <stripped> WARN zapctxd/logger_test.go:161 msg {"lvl": "warn"}
169
+ <stripped> ERROR zapctxd/logger_test.go:162 msg {"lvl": "warn"}
170
+ <stripped> INFO zapctxd/logger_test.go:163 msg {"lvl": "warn", "important": true}
171
+ <stripped> INFO zapctxd/logger_test.go:160 msg {"lvl": "info"}
172
+ <stripped> WARN zapctxd/logger_test.go:161 msg {"lvl": "info"}
173
+ <stripped> ERROR zapctxd/logger_test.go:162 msg {"lvl": "info"}
174
+ <stripped> INFO zapctxd/logger_test.go:163 msg {"lvl": "info", "important": true}
175
+ <stripped> DEBUG zapctxd/logger_test.go:159 msg {"lvl": "debug"}
176
+ <stripped> INFO zapctxd/logger_test.go:160 msg {"lvl": "debug"}
177
+ <stripped> WARN zapctxd/logger_test.go:161 msg {"lvl": "debug"}
178
+ <stripped> ERROR zapctxd/logger_test.go:162 msg {"lvl": "debug"}
179
+ <stripped> INFO zapctxd/logger_test.go:163 msg {"lvl": "debug", "important": true}
180
180
` , w .String (), w .String ())
181
181
}
182
182
@@ -249,9 +249,9 @@ func TestLogger_SkipCaller(t *testing.T) {
249
249
250
250
do ()
251
251
252
- assert .Equal (t , `<stripped> INFO zapctxd/logger_test.go:246 hello {"k": "v"}
253
- <stripped> INFO zapctxd/logger_test.go:251 world {"k": "v"}
254
- <stripped> INFO zapctxd/logger_test.go:248 hello {"k": "v"}
252
+ assert .Equal (t , `<stripped> INFO zapctxd/logger_test.go:245 hello {"k": "v"}
253
+ <stripped> INFO zapctxd/logger_test.go:250 world {"k": "v"}
254
+ <stripped> INFO zapctxd/logger_test.go:247 hello {"k": "v"}
255
255
` , w .String ())
256
256
257
257
assert .NotNil (t , zapctxd .New (zapctxd.Config {}).SkipCaller ())
0 commit comments