Class: Fluent::TextFormatter::FormatterLinebyline

Inherits:
Object
  • Object
show all
Includes:
Configurable
Defined in:
lib/fluent/plugin/formatter_linebyline.rb

Instance Method Summary collapse

Instance Method Details

#configure(conf) ⇒ Object

config_param :parameter_name, :type defines configuration parameters



10
11
12
# File 'lib/fluent/plugin/formatter_linebyline.rb', line 10

def configure(conf)
  #Does nothing because no config parameters.  Left for plugin requirements.  
end

#format(tag, time, record) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/fluent/plugin/formatter_linebyline.rb', line 15

def format(tag, time, record) 
     	
	seperationLine = "----------------"
	outputArray = [seperationLine, tag, time, ""]
  
  record.each do |key, value|
  	line = key + " : " + value
  	outputArray << line
  end

  outputArray.join("\n");
end