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 +4 -4
- data/lib/logstash/outputs/charrington/alter_postgres_table.rb +4 -0
- data/lib/logstash/outputs/charrington/alter_redshift_table.rb +5 -0
- data/lib/logstash/outputs/charrington/create_postgres_table.rb +2 -0
- data/lib/logstash/outputs/charrington/create_redshift_table.rb +2 -0
- data/lib/logstash/outputs/charrington/insert.rb +3 -0
- data/logstash-output-charrington.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8f75c19806517d0c597e782ffd4a9160f5168871b057c5d2fdc03b9e09d20b1
|
4
|
+
data.tar.gz: 5b9fa8bafb8ae65ec9dba508ec1e9c6b0dde4f26a5d203ef308eabc4661b3646
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|