diff --git a/broker/channel/channel.go b/broker/channel/channel.go index a8ca4d4f..624c8a79 100644 --- a/broker/channel/channel.go +++ b/broker/channel/channel.go @@ -9,6 +9,7 @@ import ( "github.com/meshery/meshkit/broker" "github.com/meshery/meshkit/logger" "github.com/meshery/meshkit/utils" + "github.com/sirupsen/logrus" ) type ChannelBrokerHandler struct { @@ -35,7 +36,7 @@ func NewChannelBrokerHandler(optsSetters ...OptionsSetter) *ChannelBrokerHandler var err error log, err = logger.New("channel-broker", logger.Options{ Format: logger.TerminalLogFormat, - LogLevel: 4, // Info level + LogLevel: int(logrus.InfoLevel), }) if err != nil { // Fallback to a simple logger if creation fails diff --git a/broker/nats/nats.go b/broker/nats/nats.go index b18b586e..2fa0d339 100644 --- a/broker/nats/nats.go +++ b/broker/nats/nats.go @@ -12,6 +12,7 @@ import ( "github.com/meshery/meshkit/broker" "github.com/meshery/meshkit/logger" nats "github.com/nats-io/nats.go" + "github.com/sirupsen/logrus" ) var ( @@ -98,7 +99,7 @@ func New(opts Options) (broker.Handler, error) { var lerr error lg, lerr = logger.New("nats-handler", logger.Options{ Format: logger.TerminalLogFormat, - LogLevel: 4, // Info + LogLevel: int(logrus.InfoLevel), }) if lerr != nil { // fallback to nil; we'll use std log where necessary @@ -277,4 +278,4 @@ func (in *Nats) IsEmpty() bool { return true } return in.nc == nil && in.wg == nil && in.ctx == nil && in.cancel == nil -} \ No newline at end of file +}