(tested) complete replace logrus with zerolog

* remove cobra dependency and split execs to mochi and e2e

* add log init synchronization
This commit is contained in:
Lawrence, Rendall
2022-05-02 03:13:58 +03:00
parent 4d646f7c09
commit c50a532181
36 changed files with 753 additions and 707 deletions
-1
View File
@@ -61,7 +61,6 @@ func (cfg Config) Validate() Config {
Dur("provided", cfg.ReadTimeout).
Dur("default", validcfg.ReadTimeout).
Msg("falling back to default configuration")
}
if cfg.WriteTimeout <= 0 {
+5
View File
@@ -8,8 +8,13 @@ import (
"github.com/stretchr/testify/require"
"github.com/sot-tech/mochi/bittorrent"
"github.com/sot-tech/mochi/pkg/log"
)
func init() {
_ = log.ConfigureLogger("", "warn", false, false)
}
func TestWriteError(t *testing.T) {
table := []struct {
reason, expected string