Kong/lua-resty-dns-client

Do not write multi-line error logs entries

p0pr0ck5 opened this issue · 0 comments

We see entries like this

2018/08/02 19:23:46 [error] 2669#0: *169201 [lua] balancer.lua:783: execute(): [dns] dns server error: 3 name error. Tried: (short)dne:(na) - cache-miss
dne.service.kong-aws-us-west-1:1 - cache-miss/scheduled/querying/dns server error: 3 name error
dne.node.kong-aws-us-west-1:1 - cache-miss/scheduled/querying/dns server error: 3 name error
dne:1 - cache-miss/scheduled/querying/dns server error: 3 name error
dne.service.kong-aws-us-west-1:5 - cache-miss/scheduled/querying/dns server error: 3 name error
dne.node.kong-aws-us-west-1:5 - cache-miss/scheduled/querying/dns client error: 101 empty record received
dne:5 - cache-miss/scheduled/querying/dns server error: 3 name error
dne.service.kong-aws-us-west-1:33 - cache-miss/scheduled/querying/dns server error: 3 name error
dne.node.kong-aws-us-west-1:33 - cache-miss/scheduled/querying/dns client error: 101 empty record received
dne:33 - cache-miss/scheduled/querying/dns server error: 3 name error
, client: 98.173.7.34, server: kong, request: "GET / HTTP/1.1", host: "poprocks.kong-cloud.com"

This is impossible to parse correct. It would be great if the __tostring metamethod didn't separate these by newline: