1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +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

@@ -50,6 +50,7 @@ func New(cfg Config) *Sessions {
// UseDatabase adds a session database to the manager's provider,
// a session db doesn't have write access
func (s *Sessions) UseDatabase(db Database) {
db.SetLogger(s.config.Logger) // inject the logger.
s.provider.RegisterDatabase(db)
}