fluent-plugin-light-core 0.1.6 → 0.1.7
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 +4 -4
- data/fluent-plugin-light-core.gemspec +1 -1
- data/lib/fluent/plugin/filter_light_core.rb +6 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c4d041335b9467160fedaea9bce6fb75eff175f37de2038206d2440ecc1bfae
|
4
|
+
data.tar.gz: c14749f93a1ecdc0cb44cf73fd16623d506c772e0a2eb0a6189f0e0def12e4b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb375db84158ad07ba34fd4bf85e91e6ff40f1d279a54fa3d1b4ff2d2b3690161b6e829e194a7135cd7df3f82122b964ccefd1a9ceb5a70d35901a00bddf4bfa
|
7
|
+
data.tar.gz: 775c489403bcd59b1ac1d4591594a2fd3ad2585fa080a6c25403d9104c8f94c3e6725fb271574bfb2c185ca174f829cd5bf7f9d829a5c9891784f9c70f1b1338
|
@@ -88,11 +88,12 @@ module Fluent
|
|
88
88
|
|
89
89
|
# Parse the application log
|
90
90
|
def filter_app(tag, time, record)
|
91
|
-
file = record['file'].split('/').last.split('_')
|
92
|
-
log = record['log']
|
91
|
+
file = record['file'].split('/').last.split('_') # Parse log file name
|
92
|
+
log = record['log'] # Get detailed log content
|
93
93
|
|
94
94
|
# Set common items
|
95
|
-
record['environment'] = Socket.gethostname.split('-')[0]
|
95
|
+
# record['environment'] = Socket.gethostname.split('-')[0] # dev | prd
|
96
|
+
record['environment'] = ENV['FLUENTD_ENV'] # dev | prd
|
96
97
|
record['cid'] = file[0] # container id
|
97
98
|
record['cname'] = file[0].split('-')[1] # container name
|
98
99
|
record['ctime'] = record['time'] # container time
|
@@ -146,7 +147,7 @@ module Fluent
|
|
146
147
|
file = record['file'].split('/').last.split('_')
|
147
148
|
log = record['log']
|
148
149
|
|
149
|
-
record['environment'] =
|
150
|
+
record['environment'] = ENV['FLUENTD_ENV']
|
150
151
|
record['cid'] = file[0]
|
151
152
|
record['cname'] = tag
|
152
153
|
record['ctime'] = record['time']
|
@@ -211,7 +212,7 @@ module Fluent
|
|
211
212
|
file = record['file'].split('/').last.split('_')
|
212
213
|
log = record['log']
|
213
214
|
|
214
|
-
record['environment'] =
|
215
|
+
record['environment'] = ENV['FLUENTD_ENV']
|
215
216
|
record['cid'] = file[0]
|
216
217
|
record['cname'] = tag
|
217
218
|
record['ctime'] = record['time']
|