Sha256: 8a60fee51b9d167240efc439a420b6ac6fe9b025b48447199dba88eff928ad0d
Contents?: true
Size: 592 Bytes
Versions: 9
Compression:
Stored size: 592 Bytes
Contents
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one # or more contributor license agreements. Licensed under the Elastic License; # you may not use this file except in compliance with the Elastic License. require 'stud/try' module LogStash module Helpers class LoggableTry < Stud::Try def initialize(logger, name) @logger = logger @name = name end def log_failure(exception, fail_count, message) @logger.warn("Attempt to #{@name} but failed. #{message}", fail_count: fail_count, exception: exception.message) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems