diff --git a/pkg/ffapi/handler.go b/pkg/ffapi/handler.go index 541ec54..9409b1e 100644 --- a/pkg/ffapi/handler.go +++ b/pkg/ffapi/handler.go @@ -365,8 +365,10 @@ func (hs *HandlerFactory) getTimeout(req *http.Request) time.Duration { } func (hs *HandlerFactory) APIWrapper(handler HandlerFunction) http.HandlerFunc { + if hs.apiEntryLoggingLevel == 0 { + hs.SetAPIEntryLoggingLevel(logrus.InfoLevel) + } return func(res http.ResponseWriter, req *http.Request) { - reqTimeout := hs.getTimeout(req) ctx, cancel := context.WithTimeout(req.Context(), reqTimeout) httpReqID := req.Header.Get(RequestIDHeader()) diff --git a/pkg/ffapi/handler_test.go b/pkg/ffapi/handler_test.go index 2dc1cf7..3db1ace 100644 --- a/pkg/ffapi/handler_test.go +++ b/pkg/ffapi/handler_test.go @@ -60,7 +60,6 @@ func newTestHandlerFactory(basePath string, basePathParams []*PathParam) *Handle BasePath: basePath, BasePathParams: basePathParams, } - hr.SetAPIEntryLoggingLevel(logrus.DebugLevel) return hr }