Remove github.com/romana/rlog dependency completely (#374)

* Remove `github.com/romana/rlog` dependency completely

* Comment out all the unnecessary logging in the protocol extensions

* Remove commented out all the unnecessary logging lines

* Remove two more lines related to logging
This commit is contained in:
M. Mert Yıldıran
2021-10-19 16:13:03 +03:00
committed by GitHub
parent 0473181f0a
commit 29ba963c48
21 changed files with 22 additions and 129 deletions

View File

@@ -11,9 +11,9 @@ import (
"github.com/getkin/kin-openapi/openapi3filter"
"github.com/getkin/kin-openapi/routers"
legacyrouter "github.com/getkin/kin-openapi/routers/legacy"
"github.com/romana/rlog"
"github.com/up9inc/mizu/shared"
"github.com/up9inc/mizu/shared/logger"
"github.com/up9inc/mizu/tap/api"
)
@@ -27,7 +27,7 @@ func loadOAS(ctx context.Context) (doc *openapi3.T, contractContent string, rout
path := fmt.Sprintf("%s/%s", shared.RulePolicyPath, shared.ContractFileName)
bytes, err := ioutil.ReadFile(path)
if err != nil {
rlog.Error(err.Error())
logger.Log.Error(err.Error())
return
}
contractContent = string(bytes)
@@ -35,7 +35,7 @@ func loadOAS(ctx context.Context) (doc *openapi3.T, contractContent string, rout
doc, _ = loader.LoadFromData(bytes)
err = doc.Validate(ctx)
if err != nil {
rlog.Error(err.Error())
logger.Log.Error(err.Error())
return
}
router, _ = legacyrouter.NewRouter(doc)