mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-26 18:04:22 +00:00
logging: remove reamining instances of SetLogger interface (#7572)
This commit is contained in:
@@ -41,6 +41,7 @@ type WebsocketManager struct {
|
||||
// NewWebsocketManager returns a new WebsocketManager that passes a map of
|
||||
// functions, connection options and logger to new WS connections.
|
||||
func NewWebsocketManager(
|
||||
logger log.Logger,
|
||||
funcMap map[string]*RPCFunc,
|
||||
wsConnOptions ...func(*wsConnection),
|
||||
) *WebsocketManager {
|
||||
@@ -60,16 +61,11 @@ func NewWebsocketManager(
|
||||
return true
|
||||
},
|
||||
},
|
||||
logger: log.NewNopLogger(),
|
||||
logger: logger,
|
||||
wsConnOptions: wsConnOptions,
|
||||
}
|
||||
}
|
||||
|
||||
// SetLogger sets the logger.
|
||||
func (wm *WebsocketManager) SetLogger(l log.Logger) {
|
||||
wm.logger = l
|
||||
}
|
||||
|
||||
// WebsocketHandler upgrades the request/response (via http.Hijack) and starts
|
||||
// the wsConnection.
|
||||
func (wm *WebsocketManager) WebsocketHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user