Skip to content

Commit

Permalink
Fix usage of default logger
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Dec 21, 2023
1 parent 8cb9008 commit d1c5ef8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions provisioning.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (

"github.com/gorilla/mux"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/id"

Expand Down Expand Up @@ -364,6 +363,7 @@ type SetRelayRequest struct {
}

func (prov *ProvisioningAPI) SetRelay(w http.ResponseWriter, r *http.Request) {
log := zerolog.Ctx(r.Context())
var req SetRelayRequest
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
log.Warn().Err(err).Msg("Got error parsing request")
Expand Down Expand Up @@ -636,7 +636,7 @@ func (prov *ProvisioningAPI) ChatwootStartChat(w http.ResponseWriter, r *http.Re
return
}

log.Info().
zerolog.Ctx(r.Context()).Info().
Str("phone_number", startChatRequest.PhoneNumber).
Str("email", startChatRequest.Email).
Msg("Got start chat request from Chatwoot bot")
Expand Down

0 comments on commit d1c5ef8

Please sign in to comment.