private void initLogstashHost() { if (logstashHost != null) { return; } Properties props; try { props = IOUtils.readPropertiesFromFile(propsFile); } catch (final Exception e) { throw new IllegalStateException("Failed reading properties file : " + e.getMessage()); } logstashHost = props.getProperty("logstash_server_host"); }