Skip to content

Commit dac08b2

Browse files
authored
Demote WARN to INFO if behaviour is expected for connect. (#1211)
In the register phase connecting to Elasticsearch does not warrant a WARN as it is expected behaviour. This commit moves the log entry from WARN to INFO to cut down on logging, and differentiates the text message accordingly.
1 parent d9dd45e commit dac08b2

File tree

1 file changed

+5
-1
lines changed
  • lib/logstash/outputs/elasticsearch/http_client

1 file changed

+5
-1
lines changed

lib/logstash/outputs/elasticsearch/http_client/pool.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,11 @@ def healthcheck!(register_phase = true)
286286
raise root_bad_code_err if root_bad_code_err
287287

288288
# If no exception was raised it must have succeeded!
289-
logger.warn("Restored connection to ES instance", url: url.sanitized.to_s)
289+
if register_phase
290+
logger.info("Connected to ES instance", url: url.sanitized.to_s)
291+
else
292+
logger.warn("Restored connection to ES instance", url: url.sanitized.to_s)
293+
end
290294

291295
# We check its ES version
292296
es_version, build_flavor = parse_es_version(root_response)

0 commit comments

Comments
 (0)