logstash-output-jdbc 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 033e6d7684e87ec8494733ad218b09ad81145442
4
- data.tar.gz: 4b2502b6210e89621a9416a32666d5e511082fe1
3
+ metadata.gz: 4b760f6bc7aa84ee77dd268b38081ef35878d46d
4
+ data.tar.gz: 4b99e1ad5c7ac3ed869de5dbe8b1e253bf0a5916
5
5
  SHA512:
6
- metadata.gz: 4584a4a7129bf1dcbcb30a2d7bb3b628aef7bacd7a9d8607768ffcb2f77f63ee3ee915ed72b80f378fd55efaa6d7dd48a7722003816790f64b85f61ac18985dc
7
- data.tar.gz: a75c975b799472844afd9448e2f054ac8ce6d1b618ba77daae8a4ceb3acce7919c3ae912a6044594f4d608528e5a08255e163926ffa8a6f9b0f6fe3c88d389ed
6
+ metadata.gz: 5866e51f0e50a318fd73ed0b8be8830fb639f0382cb2e730ea23d220bc31881c04a7cd18732eb542d32c34e6a3ca489939516d3ce4b615266c2000800bd4b823
7
+ data.tar.gz: d1778708ef6d8b78b000cbeca8eb7e863daf0bc57920f8317aa5395a914432e87ec490df8a651752f52398531b8386cefae1b2ced61ff6f28061df88e61644eb
data/README.md CHANGED
@@ -1,16 +1,20 @@
1
- # logstash-jdbc
2
- JDBC output plugin for Logstash.
1
+ # logstash-output-jdbc
3
2
  This plugin is provided as an external plugin and is not part of the Logstash project.
4
3
 
5
- ## Warning
6
- The master branch is for 1.5, is currently incomplete and should NOT be used (yet).
7
-
8
- Please see the v1.4 branch for v1.4 of Logstash.
4
+ This plugin allows you to output to SQL databases, using JDBC adapters.
5
+ See below for tested adapters, and example configurations.
9
6
 
10
7
  This has not yet been extensively tested with all JDBC drivers and may not yet work for you.
11
8
 
9
+ This plugin does not bundle any JDBC jar files, and does expect them to be in a
10
+ particular location. Please ensure you read the 4 installation lines below.
11
+
12
+ ## Versions
13
+ - See master branch for logstash v1.5
14
+ - See v1.4 branch for logstash 1.4
15
+
12
16
  ## Installation
13
- - Copy lib directory contents into your logstash installation.
17
+ - Run `bin/plugin install logstash-output-jdbc` in your logstash installation directory
14
18
  - Create the directory vendor/jar/jdbc in your logstash installation (`mkdir -p vendor/jar/jdbc/`)
15
19
  - Add JDBC jar files to vendor/jar/jdbc in your logstash installation
16
20
  - Configure
@@ -93,5 +97,3 @@ output {
93
97
  }
94
98
  }
95
99
  ```
96
-
97
- /* vim: set ts=4 sw=4 tw=0 :*/
@@ -117,6 +117,12 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
117
117
  statement.setFloat(idx + 1, event[i])
118
118
  when String
119
119
  statement.setString(idx + 1, event[i])
120
+ when true
121
+ statement.setBoolean(idx + 1, true)
122
+ when false
123
+ statement.setBoolean(idx + 1, false)
124
+ when nil
125
+ statement.setString(idx + 1, nil)
120
126
  else
121
127
  statement.setString(idx + 1, event.sprintf(i))
122
128
  end
@@ -133,6 +139,9 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
133
139
  # Since the exceutebatch failed this should mean any events failed to be
134
140
  # inserted will be re-run. We're going to log it for the lols anyway.
135
141
  @logger.warn("JDBC - Exception. Will automatically retry", :exception => e)
142
+ if e.getNextException() != nil
143
+ @logger.warn("JDBC - Exception. Will automatically retry", :exception => e.getNextException())
144
+ end
136
145
  end
137
146
 
138
147
  statement.close()
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-jdbc'
3
- s.version = "0.1.0"
3
+ s.version = "0.1.1"
4
4
  s.licenses = [ "Apache License (2.0)" ]
5
5
  s.summary = "This plugin allows you to output to SQL, via JDBC"
6
6
  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"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-jdbc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - the_angry_angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-26 00:00:00.000000000 Z
11
+ date: 2015-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core