Preparing for 0.2.10
This commit is contained in:
		
							parent
							
								
									61c7a1307e
								
							
						
					
					
						commit
						b10462dacd
					
				@ -288,11 +288,11 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
 | 
				
			|||||||
    @statement[1..-1].each_with_index do |i, idx|
 | 
					    @statement[1..-1].each_with_index do |i, idx|
 | 
				
			||||||
      value = event[i]
 | 
					      value = event[i]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if value.nil? and i.to_s =~ /%{/
 | 
					      value = if value.nil? and i.to_s =~ /%{/
 | 
				
			||||||
        value = event.sprintf(i)
 | 
					                event.sprintf(i)
 | 
				
			||||||
      else
 | 
					              else
 | 
				
			||||||
        value = i
 | 
					                value
 | 
				
			||||||
      end
 | 
					              end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      case value
 | 
					      case value
 | 
				
			||||||
      when Time
 | 
					      when Time
 | 
				
			||||||
@ -325,10 +325,11 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  def log_jdbc_exception(exception, retrying)
 | 
					  def log_jdbc_exception(exception, retrying)
 | 
				
			||||||
    current_exception = exception
 | 
					    current_exception = exception
 | 
				
			||||||
    log_text = 'JDBC Exception. ' + (retrying ? 'Retrying' : 'No retry') + '.'
 | 
					    log_text = 'JDBC - Exception. ' + (retrying ? 'Retrying' : 'Not retrying') + '.'
 | 
				
			||||||
 | 
					    log_method = (retrying ? 'warn' : 'error')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    loop do
 | 
					    loop do
 | 
				
			||||||
      @logger.error(log_text, :exception => current_exception, :backtrace => current_exception.backtrace)
 | 
					      @logger.send(log_method, log_text, :exception => current_exception, :backtrace => current_exception.backtrace)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if current_exception.respond_to? 'getNextException'
 | 
					      if current_exception.respond_to? 'getNextException'
 | 
				
			||||||
        current_exception = current_exception.getNextException()
 | 
					        current_exception = current_exception.getNextException()
 | 
				
			||||||
@ -341,7 +342,7 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def retry_exception?(exception)
 | 
					  def retry_exception?(exception)
 | 
				
			||||||
    retrying = (exception.respond_to? 'getSQLState' and RETRYABLE_SQLSTATE_CLASSES.include?(exception.getSQLState[0,2]))
 | 
					    retrying = (exception.respond_to? 'getSQLState' and RETRYABLE_SQLSTATE_CLASSES.include?(exception.getSQLState.to_s[0,2]))
 | 
				
			||||||
    log_jdbc_exception(exception, retrying)
 | 
					    log_jdbc_exception(exception, retrying)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    retrying
 | 
					    retrying
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
Gem::Specification.new do |s|
 | 
					Gem::Specification.new do |s|
 | 
				
			||||||
  s.name = 'logstash-output-jdbc'
 | 
					  s.name = 'logstash-output-jdbc'
 | 
				
			||||||
  s.version = "0.2.9"
 | 
					  s.version = "0.2.10"
 | 
				
			||||||
  s.licenses = [ "Apache License (2.0)" ]
 | 
					  s.licenses = [ "Apache License (2.0)" ]
 | 
				
			||||||
  s.summary = "This plugin allows you to output to SQL, via JDBC"
 | 
					  s.summary = "This plugin allows you to output to SQL, via JDBC"
 | 
				
			||||||
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
 | 
					  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
 | 
				
			||||||
@ -19,11 +19,11 @@ Gem::Specification.new do |s|
 | 
				
			|||||||
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
 | 
					  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Gem dependencies
 | 
					  # Gem dependencies
 | 
				
			||||||
  s.add_runtime_dependency "logstash-core", ">= 2.0.0.beta2", "< 3.0.0"
 | 
					 | 
				
			||||||
  s.add_runtime_dependency 'stud'
 | 
					  s.add_runtime_dependency 'stud'
 | 
				
			||||||
  s.add_runtime_dependency "logstash-codec-plain"
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  s.add_development_dependency "logstash-devutils"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  s.post_install_message = "logstash-output-jdbc 0.2.0 introduces several new features - please ensure you check the documentation in the README file"
 | 
					  s.add_runtime_dependency "logstash-core", ">= 2.0.0", "< 3.0.0"
 | 
				
			||||||
 | 
					  s.add_runtime_dependency "logstash-codec-plain"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # https://github.com/elastic/logstash-devutils/issues/48
 | 
				
			||||||
 | 
					  s.add_development_dependency "logstash-devutils", '0.0.18'
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user