Skip to content

Commit

Permalink
Expose log constants via type-aliasing (Azure#17577)
Browse files Browse the repository at this point in the history
<!--
Thank you for contributing to the Azure SDK for Go.

Please verify the following before submitting your PR, thank you!
-->

- [ ] The purpose of this PR is explained in this or a referenced issue.
- [ ] The PR does not update generated files.
   - These files are managed by the codegen framework at [Azure/autorest.go][].
- [ ] Tests are included and/or updated for code changes.
- [ ] Updates to [CHANGELOG.md][] are included.
- [ ] MIT license headers are included in each file.

[Azure/autorest.go]: https://github.com/Azure/autorest.go
[CHANGELOG.md]: https://github.com/Azure/azure-sdk-for-go/blob/main/CHANGELOG.md
  • Loading branch information
jhendrixMSFT authored Apr 14, 2022
1 parent 47b0fa8 commit 878dff8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sdk/messaging/azservicebus/internal/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus/internal/atom"
)

// NOTE: these are intended to mirror the constant values in azservicebus/log.go
// NOTE: these are publicly exported via type-aliasing in azservicebus/log.go
const (
// EventConn is used whenever we create a connection or any links (ie: receivers, senders).
EventConn log.Event = "azsb.Conn"
Expand Down
12 changes: 6 additions & 6 deletions sdk/messaging/azservicebus/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@

package azservicebus

import "github.com/Azure/azure-sdk-for-go/sdk/azcore/log"
import "github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus/internal"

const (
// EventConn is used whenever we create a connection or any links (ie: receivers, senders).
EventConn log.Event = "azsb.Conn"
EventConn = internal.EventConn

// EventAuth is used when we're doing authentication/claims negotiation.
EventAuth log.Event = "azsb.Auth"
EventAuth = internal.EventAuth

// EventReceiver represents operations that happen on Receivers.
EventReceiver log.Event = "azsb.Receiver"
EventReceiver = internal.EventReceiver

// EventSender represents operations that happen on Senders.
EventSender log.Event = "azsb.Sender"
EventSender = internal.EventSender

// EventAdmin is used for operations in the azservicebus/admin.Client
EventAdmin log.Event = "azsb.Admin"
EventAdmin = internal.EventAdmin
)

0 comments on commit 878dff8

Please sign in to comment.