1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00

add two new examples and share the app's specific logger instance with sessions databases and APIBuilder

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-16 07:07:36 +03:00
parent ef7d365e81
commit 889b7942d3
23 changed files with 346 additions and 89 deletions

View File

@@ -247,8 +247,8 @@ var _ websocket.ConnHandler = (*Application)(nil)
// It returns a collection of namespace and events that
// were registered through `HandleWebsocket` controllers.
func (app *Application) GetNamespaces() websocket.Namespaces {
if golog.Default.Level == golog.DebugLevel {
websocket.EnableDebug(golog.Default)
if logger := app.Router.Logger(); logger.Level == golog.DebugLevel {
websocket.EnableDebug(logger)
}
return websocket.JoinConnHandlers(app.websocketControllers...).GetNamespaces()