-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: migrate logrus to zap #34
Conversation
cc @onedr0p |
|
internal/unifi/client.go
Outdated
|
||
return records, nil | ||
} | ||
|
||
// CreateEndpoint creates a new DNS record in the UniFi controller. | ||
func (c *httpClient) CreateEndpoint(endpoint *endpoint.Endpoint) (*DNSRecord, error) { | ||
logger := logging.GetLogger() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be imported from a custom logging module, not instantiated in every function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an example https://stackoverflow.com/a/70974263/10496442
Don't want to fetch each time.
…hook ( v0.1.0 → v0.2.0 ) (#3844) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/kashalls/external-dns-unifi-webhook](https://togithub.com/kashalls/external-dns-unifi-webhook) | minor | `v0.1.0` -> `v0.2.0` | --- ### Release Notes <details> <summary>kashalls/external-dns-unifi-webhook (ghcr.io/kashalls/external-dns-unifi-webhook)</summary> ### [`v0.2.0`](https://togithub.com/kashalls/external-dns-unifi-webhook/releases/tag/v0.2.0) [Compare Source](https://togithub.com/kashalls/external-dns-unifi-webhook/compare/v0.1.0...v0.2.0) #### What's Changed - chore(deps): update dependency go to v1.22.4 by [@​renovate](https://togithub.com/renovate) in [https://github.com/kashalls/external-dns-unifi-webhook/pull/31](https://togithub.com/kashalls/external-dns-unifi-webhook/pull/31) - fix(deps): update module golang.org/x/net to v0.26.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/kashalls/external-dns-unifi-webhook/pull/32](https://togithub.com/kashalls/external-dns-unifi-webhook/pull/32) - chore: Add CoC, CODEOWNERS, and issue templates by [@​onedr0p](https://togithub.com/onedr0p) in [https://github.com/kashalls/external-dns-unifi-webhook/pull/33](https://togithub.com/kashalls/external-dns-unifi-webhook/pull/33) - feat: migrate logrus to zap by [@​kashalls](https://togithub.com/kashalls) in [https://github.com/kashalls/external-dns-unifi-webhook/pull/34](https://togithub.com/kashalls/external-dns-unifi-webhook/pull/34) **Full Changelog**: kashalls/external-dns-unifi-webhook@v0.1.0...v0.2.0 </details> <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDcuMyIsInVwZGF0ZWRJblZlciI6IjM3LjQwNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19--> Co-authored-by: repo-jeeves[bot] <106431701+repo-jeeves[bot]@users.noreply.github.com>
…hook ( v0.1.0 → v0.2.0 ) (#3845) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/kashalls/external-dns-unifi-webhook](https://togithub.com/kashalls/external-dns-unifi-webhook) | minor | `v0.1.0` -> `v0.2.0` | --- ### Release Notes <details> <summary>kashalls/external-dns-unifi-webhook (ghcr.io/kashalls/external-dns-unifi-webhook)</summary> ### [`v0.2.0`](https://togithub.com/kashalls/external-dns-unifi-webhook/releases/tag/v0.2.0) [Compare Source](https://togithub.com/kashalls/external-dns-unifi-webhook/compare/v0.1.0...v0.2.0) #### What's Changed - chore(deps): update dependency go to v1.22.4 by [@​renovate](https://togithub.com/renovate) in [https://github.com/kashalls/external-dns-unifi-webhook/pull/31](https://togithub.com/kashalls/external-dns-unifi-webhook/pull/31) - fix(deps): update module golang.org/x/net to v0.26.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/kashalls/external-dns-unifi-webhook/pull/32](https://togithub.com/kashalls/external-dns-unifi-webhook/pull/32) - chore: Add CoC, CODEOWNERS, and issue templates by [@​onedr0p](https://togithub.com/onedr0p) in [https://github.com/kashalls/external-dns-unifi-webhook/pull/33](https://togithub.com/kashalls/external-dns-unifi-webhook/pull/33) - feat: migrate logrus to zap by [@​kashalls](https://togithub.com/kashalls) in [https://github.com/kashalls/external-dns-unifi-webhook/pull/34](https://togithub.com/kashalls/external-dns-unifi-webhook/pull/34) **Full Changelog**: kashalls/external-dns-unifi-webhook@v0.1.0...v0.2.0 </details> <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDcuMyIsInVwZGF0ZWRJblZlciI6IjM3LjQwNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19--> Co-authored-by: repo-jeeves[bot] <106431701+repo-jeeves[bot]@users.noreply.github.com>
Migrates https://github.com/sirupsen/logrus to https://github.com/uber-go/zap as logrus is in mainteance-mode and will not be releasing anything of importance.
Closes #24