lib/logstash/outputs/charrington/alter_table.rb in logstash-output-charrington-0.2.0 vs lib/logstash/outputs/charrington/alter_table.rb in logstash-output-charrington-0.2.1

- old
+ new

@@ -12,11 +12,11 @@ Error = Class.new(StandardError) AlterFailed = Class.new(Error) def initialize(connection, event, table_name, columns) @connection = connection - @event = event + @event = event.to_hash @table_name = table_name @columns = columns @column_types = [] end @@ -75,10 +75,10 @@ def execute(sql) stmt = connection.prepareStatement(prep_sql(sql)) stmt.execute() rescue Java::OrgPostgresqlUtil::PSQLException => e - # @logger.error("#{e.message}") + puts "PSQLException: #{e.message}" ensure stmt.close unless stmt.nil? end def executeQuery(sql)