fix logs, unified session_id.

This commit is contained in:
Miroslav Šedivý 2021-03-13 23:27:28 +01:00
parent cacdd9e20a
commit d83e04e7ec
10 changed files with 37 additions and 40 deletions

View file

@ -8,12 +8,12 @@ import (
func (h *MessageHandlerCtx) controlRelease(session types.Session) error {
if !session.CanHost() {
h.logger.Debug().Str("id", session.ID()).Msg("is not allowed to host")
h.logger.Debug().Str("session_id", session.ID()).Msg("is not allowed to host")
return nil
}
if !session.IsHost() {
h.logger.Debug().Str("id", session.ID()).Msg("is not the host")
h.logger.Debug().Str("session_id", session.ID()).Msg("is not the host")
return nil
}
@ -25,12 +25,12 @@ func (h *MessageHandlerCtx) controlRelease(session types.Session) error {
func (h *MessageHandlerCtx) controlRequest(session types.Session) error {
if !session.CanHost() {
h.logger.Debug().Str("id", session.ID()).Msg("is not allowed to host")
h.logger.Debug().Str("session_id", session.ID()).Msg("is not allowed to host")
return nil
}
if session.IsHost() {
h.logger.Debug().Str("id", session.ID()).Msg("is already the host")
h.logger.Debug().Str("session_id", session.ID()).Msg("is already the host")
return nil
}