logstash-output-charrington 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c0c642658ab25b48d77a2014fd49f7d2e186d29efb3317984684d23358e49a6
4
- data.tar.gz: 7e68fdb79483a5dba78cb5e54f3236a761d80ca63ad2e26f7a03b69b5db3ff94
3
+ metadata.gz: f8f75c19806517d0c597e782ffd4a9160f5168871b057c5d2fdc03b9e09d20b1
4
+ data.tar.gz: 5b9fa8bafb8ae65ec9dba508ec1e9c6b0dde4f26a5d203ef308eabc4661b3646
5
5
  SHA512:
6
- metadata.gz: 6f5a502c533bbd8079ef55853cf875523917a381d86daba5e06f5ff819c165ea171d4e5252b1d579e133c6ce7f7a89a2b2efcb7a025daf05eca312fceb8d2db5
7
- data.tar.gz: e677ff1fc8d2e0dd1d21f70665a13473a34a15225163183a5e17d2a55f3ef45ded1c36c696bf3ef6e9119fbc58e6541f5c1a620c7c4a06f9cbdc942238998d24
6
+ metadata.gz: c2b238f952aabd0b8e5240b945b55e9d61d556ea15f884f78136561d856f09806263893eab96198e425a900bd4b01b27e535c29742e09fd391682f6ffc5d693f
7
+ data.tar.gz: 8348c952b46c8c379bba21c6e6cfd634637e7ee01adcb4f64e157982492970ccd4a48e6d3a0594ac1db946fa80559fc7518346590f4cb9da4a45025f2b54c5c7
@@ -6,6 +6,7 @@ module Charrington
6
6
  # This is potentially called from Insert when an insert fails.
7
7
 
8
8
  include Service
9
+ include LogStash::Util::Loggable
9
10
  attr_reader :connection, :event, :table_name, :columns, :schema
10
11
  attr_accessor :column_types
11
12
 
@@ -81,6 +82,7 @@ module Charrington
81
82
  stmt.execute()
82
83
  rescue Java::OrgPostgresqlUtil::PSQLException => e
83
84
  puts "PSQLException: #{e.message}"
85
+ self.logger.info "PSQLException: #{e.message}"
84
86
  ensure
85
87
  stmt.close unless stmt.nil?
86
88
  end
@@ -93,10 +95,12 @@ module Charrington
93
95
  return stmt, stmt.executeQuery(prep_sql(sql))
94
96
  rescue Java::OrgPostgresqlUtil::PSQLException => e
95
97
  puts "PSQLException: #{e.message}"
98
+ self.logger.info "PSQLException: #{e.message}"
96
99
  stmt.close unless stmt.nil?
97
100
  # @logger.error("#{e.message}")
98
101
  rescue => e
99
102
  puts "Unknown exception: #{e.message}"
103
+ self.logger.info "Unknown exception: #{e.message}"
100
104
  stmt.close unless stmt.nil?
101
105
  end
102
106
 
@@ -6,6 +6,7 @@ module Charrington
6
6
  # This is potentially called from Insert when an insert fails.
7
7
 
8
8
  include Service
9
+ include LogStash::Util::Loggable
9
10
  attr_reader :connection, :event, :table_name, :columns, :schema
10
11
  attr_accessor :column_types
11
12
 
@@ -81,8 +82,10 @@ module Charrington
81
82
  stmt.execute()
82
83
  rescue Java::JavaSql::SQLException => e
83
84
  puts "Alter Redshift SQLException: #{e.message}"
85
+ self.logger.info "Alter Redshift SQLException: #{e.message}"
84
86
  rescue => e
85
87
  puts "Alter Redshift Unknown exception: #{e.message}"
88
+ self.logger.info "Alter Redshift Unknown exception: #{e.message}"
86
89
  ensure
87
90
  stmt.close unless stmt.nil?
88
91
  end
@@ -95,10 +98,12 @@ module Charrington
95
98
  return stmt, stmt.executeQuery(prep_sql(sql))
96
99
  rescue Java::JavaSql::SQLException => e
97
100
  puts "execute query SQLException: #{e.message}"
101
+ self.logger.info "execute query SQLException: #{e.message}"
98
102
  stmt.close unless stmt.nil?
99
103
  # @logger.error("#{e.message}")
100
104
  rescue => e
101
105
  puts "execute query Unknown exception: #{e.message}"
106
+ self.logger.info "execute query Unknown exception: #{e.message}"
102
107
  stmt.close unless stmt.nil?
103
108
  end
104
109
 
@@ -6,6 +6,7 @@ module Charrington
6
6
  # This is potentially called from Insert when an insert fails.
7
7
 
8
8
  include Service
9
+ include LogStash::Util::Loggable
9
10
  attr_reader :connection, :event, :table_name, :columns, :schema
10
11
  attr_accessor :column_types
11
12
 
@@ -68,6 +69,7 @@ module Charrington
68
69
  statement.execute()
69
70
  rescue Java::OrgPostgresqlUtil::PSQLException => e
70
71
  puts "PSQLException: #{e.message}"
72
+ self.logger.info "PSQLException: #{e.message}"
71
73
  ensure
72
74
  statement.close unless statement.nil?
73
75
  end
@@ -6,6 +6,7 @@ module Charrington
6
6
  # This is potentially called from Insert when an insert fails.
7
7
 
8
8
  include Service
9
+ include LogStash::Util::Loggable
9
10
  attr_reader :connection, :event, :table_name, :columns, :schema
10
11
  attr_accessor :column_types
11
12
 
@@ -78,6 +79,7 @@ module Charrington
78
79
  statement.execute()
79
80
  rescue Java::JavaSql::SQLException => e
80
81
  puts "Redshift SQLException: #{e.message}"
82
+ self.logger.info "Redshift SQLException: #{e.message}"
81
83
  ensure
82
84
  statement.close unless statement.nil?
83
85
  end
@@ -10,6 +10,7 @@ module Charrington
10
10
  # The Transform service should be called before calling this.
11
11
 
12
12
  include Service
13
+ include LogStash::Util::Loggable
13
14
  attr_accessor :event, :should_retry
14
15
  attr_reader :connection, :schema, :table_name, :columns, :driver
15
16
  attr_reader :event_as_json_keyword, :enable_event_as_json_keyword
@@ -156,8 +157,10 @@ module Charrington
156
157
  statement.execute()
157
158
  rescue Java::OrgPostgresqlUtil::PSQLException => e
158
159
  puts "PSQLException: #{e.message}"
160
+ self.logger.info "PSQLException: #{e.message}"
159
161
  rescue Java::JavaSql::SQLException => e
160
162
  puts "Redshift SQLException: #{e.message}"
163
+ self.logger.info "Redshift SQLException: #{e.message}"
161
164
  ensure
162
165
  statement.close unless statement.nil?
163
166
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-charrington'
3
- s.version = '0.3.3'
3
+ s.version = '0.3.4'
4
4
 
5
5
  s.licenses = ['Apache-2.0']
6
6
  s.homepage = 'https://gitlab.podium.com/engineering/analytics/logstash-output-charrington'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-charrington
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - dconger