File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,23 @@ var _ = Describe("Zap log level flag options setup", func() {
365
365
Expect (string (outRaw )).Should (ContainSubstring ("debug 1 text" ))
366
366
})
367
367
368
+ It ("Should set stacktrace zap-stacktrace-level flags." , func () {
369
+ args := []string {"--zap-stacktrace-level=disabled" }
370
+ fromFlags .BindFlags (& fs )
371
+ if err := fs .Parse (args ); err != nil {
372
+ Expect (err ).ToNot (HaveOccurred ())
373
+ }
374
+ logOut := new (bytes.Buffer )
375
+
376
+ logger := New (UseFlagOptions (& fromFlags ), WriteTo (logOut ))
377
+ logger .V (0 ).Info ("info text" )
378
+ logger .V (1 ).Info ("debug 1 text" )
379
+
380
+ outRaw := logOut .Bytes ()
381
+
382
+ Expect (outRaw ).To (BeEmpty ())
383
+ })
384
+
368
385
It ("Should set Level 2 increased verbosity for zap-log-level flags." , func () {
369
386
args := []string {"--zap-log-level=2" }
370
387
fromFlags .BindFlags (& fs )
You can’t perform that action at this time.
0 commit comments