diff --git a/http/mux.go b/http/mux.go index 3490e35..eb367ac 100644 --- a/http/mux.go +++ b/http/mux.go @@ -1,6 +1,8 @@ package http import ( + "github.com/kcotugno/tacitus" + "net/http" ) @@ -23,5 +25,5 @@ func NewMux() *Mux { } func (m *Mux) SetLogger(logger tacitus.Logger) { - m.TradeHandler.Logger = logger + m.TradeHandler.logger = logger } diff --git a/http/server.go b/http/server.go index 00a0856..ec2790c 100644 --- a/http/server.go +++ b/http/server.go @@ -49,5 +49,5 @@ func (s *Server) Close() { func (s *Server) SetLogger(logger tacitus.Logger) { s.logger = logger - s.Handler.Logger = logger + s.Handler.SetLogger(logger) } diff --git a/http/trade_handler.go b/http/trade_handler.go index e18b020..ffacb2e 100644 --- a/http/trade_handler.go +++ b/http/trade_handler.go @@ -11,6 +11,8 @@ import ( type TradeHandler struct { TradeService tacitus.TradeService + + logger tacitus.Logger } type tradesResponse struct {