leverage error handling as a middleware

This commit is contained in:
Leandro Moreira
2024-01-30 18:33:47 -03:00
parent 89b63f1809
commit 1e29f3c4ab
3 changed files with 15 additions and 11 deletions

View File

@@ -16,7 +16,7 @@ type SRTController struct {
func NewSRTController(c *entities.Config, l *zap.Logger, lc fx.Lifecycle) (*SRTController, error) {
// Handle logs
astisrt.SetLogLevel(astisrt.LogLevel(astisrt.LogLevelError))
astisrt.SetLogLevel(astisrt.LogLevel(astisrt.LogLevelNotice))
astisrt.SetLogHandler(func(ll astisrt.LogLevel, file, area, msg string, line int) {
l.Sugar().Infow("SRT",
"ll", ll,