Skip to content

Commit 1a46d7e

Browse files
Pere Urbon-BayesPere Urbon
authored andcommitted
warp driver loading and log in case of failure
Fixes #86
1 parent 3b43352 commit 1a46d7e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/logstash/plugin_mixins/jdbc.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ def jdbc_connect
100100
private
101101
def load_drivers(drivers)
102102
drivers.each do |driver|
103-
require driver
103+
begin
104+
require driver
105+
rescue => e
106+
@logger.error("Failed to load #{driver}", :exception => e)
107+
end
104108
end
105109
end
106110

0 commit comments

Comments
 (0)