fluent-plugin-fluent-plugin-json-size-limit 0.1.9 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 605a5c22664fbc5b0ab34e3f5bf46751890c18550dd77282e98b7afbaa50d0a8
|
4
|
+
data.tar.gz: f5f9fedee8d250370fc2b82a1681eb77c9a64987044ef40d4383b9ede5d42e40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27bb9ce05e5af7d6c8a8463bf0c38d4a2facc33ee924abdbcf74f7b88e7dcd23e6151e3ff539d8b875dcb1f9442be29cbb6e308a7e07a4448d4979b4c938b8ed
|
7
|
+
data.tar.gz: 827c654c06bdac09c5d089f5514bb6c3062c9af80a1e0e14dcca35e2cfc80d1bbc1aa7375ee72fb947c19f2417a40130dad391017408adf672c28c9706c97851
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "fluent-plugin-fluent-plugin-json-size-limit"
|
6
|
-
spec.version = "0.1.
|
6
|
+
spec.version = "0.1.11"
|
7
7
|
spec.authors = ["Mykola Panin"]
|
8
8
|
spec.email = ["mykola.panin@creatoriq.com"]
|
9
9
|
|
@@ -18,7 +18,7 @@ require 'fluent/plugin/filter'
|
|
18
18
|
module Fluent
|
19
19
|
module Plugin
|
20
20
|
class JsonSizeLimitFilter < Filter
|
21
|
-
Fluent::Plugin.register_filter('
|
21
|
+
Fluent::Plugin.register_filter('jsonsizelimit', self)
|
22
22
|
|
23
23
|
def configure(conf)
|
24
24
|
super
|
@@ -37,7 +37,6 @@ module Fluent
|
|
37
37
|
target_size = 250 * 1024
|
38
38
|
excess_size = current_size - target_size
|
39
39
|
|
40
|
-
# Уменьшаем текущее поле
|
41
40
|
new_length = [value.length - excess_size, 0].max
|
42
41
|
record[key] = value[0...new_length]
|
43
42
|
|