webrtc logging.

This commit is contained in:
Miroslav Šedivý
2021-08-29 18:59:46 +02:00
parent 8f8cd47e85
commit a03507227d
6 changed files with 44 additions and 37 deletions

View File

@ -13,7 +13,7 @@ import (
func NewImage(desktop types.DesktopManager) *ImageCtx {
return &ImageCtx{
logger: log.With().Str("module", "cursor-image").Logger(),
logger: log.With().Str("module", "webrtc").Str("submodule", "cursor-image").Logger(),
desktop: desktop,
listeners: map[uintptr]*func(entry *ImageEntry){},
cache: map[uint64]*ImageEntry{},
@ -50,10 +50,12 @@ func (manager *ImageCtx) Start() {
(*emit)(entry)
}
})
manager.logger.Info().Msg("starting")
}
func (manager *ImageCtx) Shutdown() {
manager.logger.Info().Msgf("shutting down")
manager.logger.Info().Msg("shutdown")
manager.emitMu.Lock()
for key := range manager.listeners {

View File

@ -12,7 +12,7 @@ import (
func NewPosition(desktop types.DesktopManager) *PositionCtx {
return &PositionCtx{
logger: log.With().Str("module", "cursor-position").Logger(),
logger: log.With().Str("module", "webrtc").Str("submodule", "cursor-position").Logger(),
desktop: desktop,
listeners: map[uintptr]*func(x, y int){},
}
@ -26,7 +26,7 @@ type PositionCtx struct {
}
func (manager *PositionCtx) Shutdown() {
manager.logger.Info().Msgf("shutting down")
manager.logger.Info().Msg("shutdown")
manager.emitMu.Lock()
for key := range manager.listeners {