mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
webrtc logging.
This commit is contained in:
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user