Skip to content

Commit

Permalink
Fix logger settings for api.ws module
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed May 3, 2024
1 parent edbcd3e commit 4185202
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/api/ws/ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/AlexxIT/go2rtc/internal/api"
"github.com/AlexxIT/go2rtc/internal/app"
"github.com/gorilla/websocket"
"github.com/rs/zerolog/log"
"github.com/rs/zerolog"
)

func Init() {
Expand All @@ -23,11 +23,15 @@ func Init() {

app.LoadConfig(&cfg)

log = app.GetLogger("api")

This comment has been minimized.

Copy link
@skrashevich

skrashevich May 7, 2024

Contributor

log = app.GetLogger("ws")


initWS(cfg.Mod.Origin)

api.HandleFunc("api/ws", apiWS)
}

var log zerolog.Logger

// Message - struct for data exchange in Web API
type Message struct {
Type string `json:"type"`
Expand Down

0 comments on commit 4185202

Please sign in to comment.