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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user