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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84773035328d3e9f94b3a41242a24038c9f00bf84ff4e4c282ac67d44fa75350
4
- data.tar.gz: 393720c2ce0fc4d55fabf7e9206ab57bf8085c0df9c5e043356cc87f356328c4
3
+ metadata.gz: 8c4d041335b9467160fedaea9bce6fb75eff175f37de2038206d2440ecc1bfae
4
+ data.tar.gz: c14749f93a1ecdc0cb44cf73fd16623d506c772e0a2eb0a6189f0e0def12e4b9
5
5
  SHA512:
6
- metadata.gz: eca26afd55eb797b228c2cf65653882d31718c66630041ab05243c5be3d1b85f995a8dca5c8e6cd79971cb4db5735cd2d49ccb8f0e4c9357117e90252fae81ea
7
- data.tar.gz: 8faa457619809fe3b26db9658fdf5dc66a960477541bc9ac7342b21612eb649743ec99be49ba1584e01fb8e615cd97f94dc9be9303d01fe222ed5ac654665226
6
+ metadata.gz: fb375db84158ad07ba34fd4bf85e91e6ff40f1d279a54fa3d1b4ff2d2b3690161b6e829e194a7135cd7df3f82122b964ccefd1a9ceb5a70d35901a00bddf4bfa
7
+ data.tar.gz: 775c489403bcd59b1ac1d4591594a2fd3ad2585fa080a6c25403d9104c8f94c3e6725fb271574bfb2c185ca174f829cd5bf7f9d829a5c9891784f9c70f1b1338
@@ -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-light-core"
6
- spec.version = "0.1.6"
6
+ spec.version = "0.1.7"
7
7
  spec.authors = ["LIN LI"]
8
8
  spec.email = ["l.li@alphabets.cn"]
9
9
 
@@ -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('_') # Parse log file name
92
- log = record['log'] # Get detailed log content
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] # dev | prd
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'] = Socket.gethostname.split('-')[0]
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'] = Socket.gethostname.split('-')[0]
215
+ record['environment'] = ENV['FLUENTD_ENV']
215
216
  record['cid'] = file[0]
216
217
  record['cname'] = tag
217
218
  record['ctime'] = record['time']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-light-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - LIN LI