From 3bd51c88f00ebfe394fa0f3b5de8d2e4e86ac40c Mon Sep 17 00:00:00 2001 From: Paul Hewlett Date: Tue, 23 Jul 2024 16:57:56 +0100 Subject: [PATCH] Azure Logging Info level. Also added remaining type of logging for Auth, Connection etc... AB#9718 --- azbus/azlogging.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/azbus/azlogging.go b/azbus/azlogging.go index 0a8a178..3c827cf 100644 --- a/azbus/azlogging.go +++ b/azbus/azlogging.go @@ -5,25 +5,25 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus" ) -// First attempt at incorporating azure logging. The EventSender option does not -// appear to work. +// EnableAzureLogging emits log messages using local logger. +// This must be called before any senders or receivers are opened. // TODO: Generalise this for any azure downstream package. func EnableAzureLogging(log Logger) { - log.Debugf("Enabling Azure Logging") + log.Infof("Enabling Azure Logging") azlog.SetListener(func(event azlog.Event, s string) { - log.Debugf("[%s] %s", event, s) + log.Infof("Azure sdk:[%s] %s", event, s) }) azlog.SetEvents( // EventConn is used whenever we create a connection or any links (ie: receivers, senders). - // azservicebus.EventConn, + azservicebus.EventConn, // EventAuth is used when we're doing authentication/claims negotiation. - // azservicebus.EventAuth, + azservicebus.EventAuth, // EventReceiver represents operations that happen on Receivers. azservicebus.EventReceiver, // EventSender represents operations that happen on Senders. azservicebus.EventSender, // EventAdmin is used for operations in the azservicebus/admin.Client - // azservicebus.EventAdmin, + azservicebus.EventAdmin, ) }