Skip to content

logtest: default to DPanicLevel for tests

Administrator requested to merge k/20220511-log-dpanic into main

Created by: keegancsmith

Unit tests are often testing error conditions, which leads to log spam due to error logs. We can instead raise the log level to those which atleast cause panics which unlikely is part of the happy path in a test.

This follows the same pattern we see often in our tests for log15. In those we use the DiscardHandler unless verbose testing is enabled.

Test Plan: go test ./cmd/searcher/internal/search had no output.

Merge request reports

Loading