feat: global set log level

This commit is contained in:
debugtalk
2021-10-18 09:52:57 +08:00
parent 0efcb0a8d1
commit b345b455eb
10 changed files with 52 additions and 11 deletions

View File

@@ -2,19 +2,12 @@ package hrp
import (
"net/http"
"os"
"testing"
"github.com/imroc/req"
"github.com/pkg/errors"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)
func init() {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
}
// run API test with default configs
func Run(t *testing.T, testcases ...ITestCase) error {
return NewRunner().WithTestingT(t).SetDebug(true).Run(testcases...)