Class: Fluent::DockerFilter
- Inherits:
-
Filter
- Object
- Filter
- Fluent::DockerFilter
- Defined in:
- lib/fluent/plugin/filter_docker.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #filter(tag, time, record) ⇒ Object
-
#initialize ⇒ DockerFilter
constructor
A new instance of DockerFilter.
Constructor Details
#initialize ⇒ DockerFilter
25 26 27 |
# File 'lib/fluent/plugin/filter_docker.rb', line 25 def initialize super end |
Instance Method Details
#configure(conf) ⇒ Object
29 30 31 |
# File 'lib/fluent/plugin/filter_docker.rb', line 29 def configure(conf) super end |
#filter(tag, time, record) ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fluent/plugin/filter_docker.rb', line 33 def filter(tag, time, record) if record.has_key?('log') log = record['log'] if log[0] == '{' || log[0] == '[' log_json = Yajl.load(log) record['log'] = log_json end end record end |