kashalls / external-dns-unifi-webhook

External-DNS Webhook to manage UniFi DNS Records
Apache License 2.0
93 stars 5 forks source link

feat: migrate logrus to zap #34

Closed kashalls closed 2 months ago

kashalls commented 2 months ago

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

kashalls commented 2 months ago

cc @onedr0p

kashalls commented 2 months ago
external-dns-provider-unifi
version: pr-34 (877a74d3363ca38ccb765e28516058bce1876de1)

{"level":"info","ts":1718227226.584895,"caller":"dnsprovider/dnsprovider.go:46","msg":"creating unifi provider with no kind of domain filters"}
{"level":"debug","ts":1718227226.585154,"caller":"unifi/client.go:99","msg":"making POST request to https://10.1.0.1/api/auth/login"}
{"level":"debug","ts":1718227226.5852578,"caller":"unifi/client.go:242","msg":"Requesting https://10.1.0.1/api/auth/login cookies: 0"}
{"level":"debug","ts":1718227226.8236408,"caller":"unifi/client.go:117","msg":"response code from POST request to https://10.1.0.1/api/auth/login: 200"}
{"level":"info","ts":1718227226.823977,"caller":"server/server.go:46","msg":"starting webhook server","address":"0.0.0.0:8888"}
{"level":"info","ts":1718227226.8241413,"caller":"server/server.go:59","msg":"starting health server","address":"0.0.0.0:8080"}
{"level":"debug","ts":1718227227.9255626,"caller":"webhook/webhook.go:103","msg":"requesting records","req_method":"GET","req_path":"/records"}
{"level":"debug","ts":1718227227.9256067,"caller":"unifi/client.go:99","msg":"making GET request to https://10.1.0.1/proxy/network/v2/api/site/default/static-dns/"}
{"level":"debug","ts":1718227227.9256258,"caller":"unifi/client.go:242","msg":"Requesting https://10.1.0.1/proxy/network/v2/api/site/default/static-dns/ cookies: 1"}
{"level":"debug","ts":1718227227.949754,"caller":"unifi/client.go:117","msg":"response code from GET request to https://10.1.0.1/proxy/network/v2/api/site/default/static-dns/: 200"}
{"level":"debug","ts":1718227227.9507217,"caller":"unifi/client.go:159","msg":"retrieved records: [{ Super Long List but Truncated :) ]"}
{"level":"debug","ts":1718227227.950851,"caller":"webhook/webhook.go:112","msg":"returning records","req_method":"GET","req_path":"/records","count":103}
{"level":"debug","ts":1718227227.9522557,"caller":"webhook/webhook.go:184","msg":"requesting adjust endpoints count","endpoints":10}
{"level":"debug","ts":1718227227.9523017,"caller":"webhook/webhook.go:193","msg":"return adjust endpoints response","endpoints":10}