0.2.10
This commit is contained in:
		
							parent
							
								
									b10462dacd
								
							
						
					
					
						commit
						da5a3d8be3
					
				@ -1,6 +1,10 @@
 | 
			
		||||
# Change Log
 | 
			
		||||
All notable changes to this project will be documented in this file, from 0.2.0.
 | 
			
		||||
 | 
			
		||||
## [0.2.10] - 2016-07-07
 | 
			
		||||
  - Support non-string entries in statement array
 | 
			
		||||
  - Adds backtrace to exception logging
 | 
			
		||||
 | 
			
		||||
## [0.2.9] - 2016-06-29
 | 
			
		||||
  - Fix NameError exception. 
 | 
			
		||||
  - Moved log_jdbc_exception calls
 | 
			
		||||
 | 
			
		||||
@ -286,14 +286,15 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
 | 
			
		||||
 | 
			
		||||
  def add_statement_event_params(statement, event)
 | 
			
		||||
    @statement[1..-1].each_with_index do |i, idx|
 | 
			
		||||
      value = event[i]
 | 
			
		||||
 | 
			
		||||
      value = if value.nil? and i.to_s =~ /%{/
 | 
			
		||||
                event.sprintf(i)
 | 
			
		||||
              else
 | 
			
		||||
                value
 | 
			
		||||
              end
 | 
			
		||||
 | 
			
		||||
      if i.is_a? String 
 | 
			
		||||
        value = event[i]
 | 
			
		||||
        if value.nil? and i =~ /%\{/
 | 
			
		||||
          value = event.sprintf(i)
 | 
			
		||||
        end
 | 
			
		||||
      else
 | 
			
		||||
        value = i
 | 
			
		||||
      end
 | 
			
		||||
      
 | 
			
		||||
      case value
 | 
			
		||||
      when Time
 | 
			
		||||
        # See LogStash::Timestamp, below, for the why behind strftime.
 | 
			
		||||
@ -323,6 +324,7 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
 | 
			
		||||
    statement
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  def log_jdbc_exception(exception, retrying)
 | 
			
		||||
    current_exception = exception
 | 
			
		||||
    log_text = 'JDBC - Exception. ' + (retrying ? 'Retrying' : 'Not retrying') + '.'
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user