fluent-plugin-gc 0.0.1 → 0.0.2

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: bb1437fa02731de3540d7ee9974693f29eb553a0
4
- data.tar.gz: ba92d752f3347f2c7bce8465944aceb9ed6223b9
3
+ metadata.gz: 705d9f1dfcd93cb19368ecffd3ce772c2be7ec32
4
+ data.tar.gz: 685b6ce19bb570890695391a5a6892930736e713
5
5
  SHA512:
6
- metadata.gz: 66be4e5f508caa70910d570985ae3b75d6f1e5f2e3b56d2ed01323836fd485257491861565b4ddcd8733bf110878ed52b0e7137b4c170bd3821da25bb4a76c3a
7
- data.tar.gz: b42512bc252230228aedad80025d196ffc56d91bee92b6edac5c92242579ca7688e46e8d158dbb40db4e5eeb84b77400d0f68cdc448ba8ec44947e10fa4934d4
6
+ metadata.gz: 76a62ba40564ceb0b53a494413d0739580d3168e3508ffb78dc2689d68c1d7a3e117379184c69e2eb2bcce09ecb5ecba93a06b3a6cb0a16dc797780e3508e11a
7
+ data.tar.gz: 1d62758f4a9fc4ff326d7673a5aa1a4da61b7a55439193706a724fad4f098d760e1007952a5749e2ab1dd36a5c6476cee4f8240769154650920806f53f468801
@@ -0,0 +1,9 @@
1
+ ## 0.0.2 (2014/02/04)
2
+
3
+ Enhancement:
4
+
5
+ * Support `log_level` option of Fleuntd v0.10.43
6
+
7
+ ## 0.0.1
8
+
9
+ First version
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # fluent-plugin-gc [![Build Status](https://secure.travis-ci.org/sonots/fluent-plugin-gc.png?branch=master)](http://travis-ci.org/sonots/fluent-plugin-gc)
2
2
 
3
- Fluentd plugin to disable GC and start GC at arbitrary interval
3
+ Fluentd plugin to disable GC and start GC at arbitrary interval. This plugin is for testing only.
4
4
 
5
5
  ## Configuration
6
6
 
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-gc"
6
- s.version = "0.0.1"
6
+ s.version = "0.0.2"
7
7
  s.authors = ["Naotoshi Seo"]
8
8
  s.email = ["sonots@gmail.com"]
9
9
  s.homepage = "https://github.com/sonots/fluent-plugin-gc"
@@ -2,6 +2,11 @@
2
2
  class Fluent::GcInput < Fluent::Input
3
3
  Fluent::Plugin.register_input('gc', self)
4
4
 
5
+ # To support log_level option implemented by Fluentd v0.10.43
6
+ unless method_defined?(:log)
7
+ define_method("log") { $log }
8
+ end
9
+
5
10
  config_param :disable, :bool, :default => false
6
11
  config_param :interval, :time, :default => 5
7
12
  config_param :debug, :bool, :default => false
@@ -37,16 +42,16 @@ class Fluent::GcInput < Fluent::Input
37
42
  @last_checked = now
38
43
  end
39
44
  rescue => e
40
- $log.warn "#{e.class} #{e.message} #{e.backtrace.first}"
45
+ log.warn "#{e.class} #{e.message} #{e.backtrace.first}"
41
46
  end
42
47
  end
43
48
  end
44
49
 
45
50
  def start_gc
46
- $log.info "gc: before #{GC.stat}" if @debug # intentionally info level
51
+ log.info "gc: before #{GC.stat}" if @debug # intentionally info level
47
52
  disabled = GC.enable
48
53
  GC.start
49
54
  GC.disable if disabled
50
- $log.info "gc: after #{GC.stat}" if @debug
55
+ log.info "gc: after #{GC.stat}" if @debug
51
56
  end
52
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-gc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-22 00:00:00.000000000 Z
11
+ date: 2014-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd