When running an application using logback in a docker container with no networking, we always see the following error printed:
|-ERROR in ch.qos.logback.core.util.ContextUtil@5858ba4b - Failed to get local hostname java.net.UnknownHostException
From the source, in ContextUtils.java, it looks like this exception is thrown because there are no network interfaces available. This leads to an unavoidable error being shown.
This is particularly irritating since we don't even use the hostname context values in our log formatters! That suggests that the ideal fix would be to load these values lazily.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira