log content type #121

This commit is contained in:
bakito 2022-11-07 18:05:59 +01:00
parent e75600c878
commit 6436dd9998
No known key found for this signature in database
GPG key ID: BCCEB081DB8A24D8
2 changed files with 8 additions and 4 deletions

View file

@ -45,8 +45,8 @@ ifeq (, $(shell which deepcopy-gen))
endif endif
start-replica: start-replica:
podman run --pull always --name adguardhome-replica -p 9090:80 -p 9091:3000 --rm adguard/adguardhome docker run --pull always --name adguardhome-replica -p 9090:80 -p 9091:3000 --rm adguard/adguardhome
# podman run --pull always --name adguardhome-replica -p 9090:80 -p 9091:3000 --rm adguard/adguardhome:v0.107.13 # docker run --pull always --name adguardhome-replica -p 9090:80 -p 9091:3000 --rm adguard/adguardhome:v0.107.13
check_defined = \ check_defined = \
$(strip $(foreach 1,$1, \ $(strip $(foreach 1,$1, \
@ -57,7 +57,7 @@ __check_defined = \
build-image: build-image:
$(call check_defined, AGH_SYNC_VERSION) $(call check_defined, AGH_SYNC_VERSION)
podman build --build-arg VERSION=${AGH_SYNC_VERSION} --build-arg BUILD=$(shell date -u +'%Y-%m-%dT%H:%M:%S.%3NZ') --name adgardhome-replica -t ghcr.io/bakito/adguardhome-sync:${AGH_SYNC_VERSION} . docker build --build-arg VERSION=${AGH_SYNC_VERSION} --build-arg BUILD=$(shell date -u +'%Y-%m-%dT%H:%M:%S.%3NZ') --name adgardhome-replica -t ghcr.io/bakito/adguardhome-sync:${AGH_SYNC_VERSION} .
kind-create: kind-create:
kind delete cluster kind delete cluster

View file

@ -147,7 +147,11 @@ func (cl *client) doGet(req *resty.Request, url string) error {
rl.With("status", resp.StatusCode(), "body", string(resp.Body()), "error", err).Debug("error in do get") rl.With("status", resp.StatusCode(), "body", string(resp.Body()), "error", err).Debug("error in do get")
return detailedError(resp, err) return detailedError(resp, err)
} }
rl.With("status", resp.StatusCode(), "body", string(resp.Body())).Debug("got response") rl.With(
"status", resp.StatusCode(),
"body", string(resp.Body()),
"content-type", resp.Header()["Content-Type"],
).Debug("got response")
if resp.StatusCode() != http.StatusOK { if resp.StatusCode() != http.StatusOK {
return detailedError(resp, nil) return detailedError(resp, nil)
} }