security/sshguard: fix logging of entries with hostnames
With work from martin@lispworks.com
PR: 272249
Reported by: martin@lispworks.com
Approved by: kevinz5000@gmail.com (maintainer)
(cherry picked from commit efda5c514648db7c2bbacaa7a57dfa946dd9f054)