Merge v2.x fixes

This commit is contained in:
Karl Southern 2016-05-02 18:14:12 +01:00
commit 8f5ceb451a
2 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,9 @@
# Change Log
All notable changes to this project will be documented in this file, from 0.2.0.
## [0.2.6] - 2016-05-02
- Fix for exception infinite loop
## [0.2.5] - 2016-04-11
### Added
- Basic tests running against DerbyDB

View File

@ -277,12 +277,12 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
statement
end
def log_jdbc_exception(e)
ce = e
def log_jdbc_exception(exception)
current_exception = exception
loop do
@logger.error("JDBC Exception encountered: Will automatically retry.", :exception => ce)
ce = e.getNextException()
break if ce == nil
@logger.error("JDBC Exception encountered: Will automatically retry.", :exception => current_exception)
current_exception = current_exception.getNextException()
break if current_exception == nil
end
end
end # class LogStash::Outputs::jdbc