log2json 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/redis2es +2 -4
  2. data/log2json.gemspec +1 -1
  3. metadata +2 -2
data/bin/redis2es CHANGED
@@ -103,14 +103,12 @@ def es_index(tstamp)
103
103
  end
104
104
 
105
105
  def enqueue(logstr)
106
- #FIXME: might be safer to do a transcoding with replacements for invalid or undefined characters.
107
- log = JSON.load(logstr.force_encoding(LOG_ENCODING))
108
-
109
106
  # add header for each entry according to http://www.elasticsearch.org/guide/reference/api/bulk/
107
+ log = JSON.load(logstr.force_encoding(LOG_ENCODING))
110
108
  @queue << (
111
109
  {"index" => {"_index" => es_index(log["@timestamp"]), "_type" => log["@type"]}}.to_json <<
112
110
  "\n" <<
113
- log.to_json <<
111
+ logstr <<
114
112
  "\n"
115
113
  )
116
114
  end
data/log2json.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'log2json'
3
- s.version = '0.1.10'
3
+ s.version = '0.1.11'
4
4
  s.summary = "Read, filter and ship logs. ie, poor man's roll-your-own, light-weight logstash replacement."
5
5
  s.description = IO.read(File.join(File.dirname(__FILE__), 'README'))
6
6
  s.authors = ['Jack Kuan']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log2json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-11 00:00:00.000000000 Z
12
+ date: 2013-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jls-grok