Skip to content

Commit

Permalink
silence notifier http client (#445)
Browse files Browse the repository at this point in the history
* notifier log error -> warn

* silence all
  • Loading branch information
frostbyte73 authored Aug 10, 2023
1 parent 3892d26 commit 6b455c1
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions webhook/url_notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func NewURLNotifier(params URLNotifierParams) *URLNotifier {
params: params,
client: retryablehttp.NewClient(),
}
n.client.Logger = &logAdapter{logger: params.Logger.WithCallDepth(1)}
n.client.Logger = &logAdapter{}
n.worker = core.NewQueueWorker(core.QueueWorkerParams{
QueueSize: params.QueueSize,
DropWhenFull: true,
Expand Down Expand Up @@ -138,22 +138,6 @@ func (n *URLNotifier) send(event *livekit.WebhookEvent) error {
return nil
}

type logAdapter struct {
logger logger.Logger
}

func (l *logAdapter) Error(msg string, keysAndValues ...interface{}) {
l.logger.Errorw(msg, nil, keysAndValues...)
}

func (l *logAdapter) Info(msg string, keysAndValues ...interface{}) {
l.logger.Infow(msg, keysAndValues...)
}

func (l *logAdapter) Debug(msg string, keysAndValues ...interface{}) {
l.logger.Debugw(msg, keysAndValues...)
}
type logAdapter struct{}

func (l *logAdapter) Warn(msg string, keysAndValues ...interface{}) {
l.logger.Warnw(msg, nil, keysAndValues...)
}
func (l *logAdapter) Printf(string, ...interface{}) {}

0 comments on commit 6b455c1

Please sign in to comment.