log2json 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/redis2es +13 -2
- data/log2json.gemspec +1 -1
- metadata +2 -2
data/bin/redis2es
CHANGED
@@ -60,8 +60,8 @@ const(:REDO_LOG, File.join(Dir.getwd, "redo.log"))
|
|
60
60
|
# At the termination of this process, it will then be moved to the redo log.
|
61
61
|
|
62
62
|
|
63
|
-
LOG = Logger.new(
|
64
|
-
HTTP_LOG = Logger.new(
|
63
|
+
LOG = Logger.new(STDERR)
|
64
|
+
HTTP_LOG = Logger.new(STDERR)
|
65
65
|
HTTP_LOG.level = Logger::WARN
|
66
66
|
|
67
67
|
@@http = PersistentHTTP.new(
|
@@ -232,12 +232,23 @@ def main
|
|
232
232
|
flush_queue()
|
233
233
|
end
|
234
234
|
|
235
|
+
if @shutdown
|
236
|
+
LOG.warn("Terminating! Flusing the queue(size=#{@queue.size})...")
|
237
|
+
flush_queue()
|
238
|
+
exit(0)
|
239
|
+
end
|
240
|
+
|
235
241
|
end # loop
|
236
242
|
end
|
237
243
|
|
244
|
+
Signal.trap("TERM") do
|
245
|
+
@shutdown = true
|
246
|
+
end
|
247
|
+
|
238
248
|
|
239
249
|
handle_redo_log()
|
240
250
|
begin
|
251
|
+
LOG.info("Starting processing loop...")
|
241
252
|
main()
|
242
253
|
ensure
|
243
254
|
LOG.warn("Terminating! Flusing the queue(size=#{@queue.size})...")
|
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.
|
3
|
+
s.version = '0.1.18'
|
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.
|
4
|
+
version: 0.1.18
|
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-
|
12
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jls-grok
|