*: added more logging

This commit is contained in:
Andrey Meshkov
2020-04-15 15:17:57 +03:00
parent 4bdf22eadc
commit 1a34b96d03
4 changed files with 17 additions and 10 deletions

View File

@@ -71,6 +71,8 @@ type User struct {
// InitAuth - create a global object
func InitAuth(dbFilename string, users []User, sessionTTL uint32) *Auth {
log.Info("Initializing auth module: %s", dbFilename)
a := Auth{}
a.sessionTTL = sessionTTL
a.sessions = make(map[string]*session)
@@ -83,7 +85,7 @@ func InitAuth(dbFilename string, users []User, sessionTTL uint32) *Auth {
}
a.loadSessions()
a.users = users
log.Debug("Auth: initialized. users:%d sessions:%d", len(a.users), len(a.sessions))
log.Info("Auth: initialized. users:%d sessions:%d", len(a.users), len(a.sessions))
return &a
}