diff --git a/app/models/fluentd/setting/in_tail.rb b/app/models/fluentd/setting/in_tail.rb index 855f222..89de568 100644 --- a/app/models/fluentd/setting/in_tail.rb +++ b/app/models/fluentd/setting/in_tail.rb @@ -31,43 +31,6 @@ class Fluentd end end - def extra_format_options - self.class.known_formats[format.to_sym] || [] - end - - def format_specific_conf - return "" if %w(grok regexp).include?(format) - - indent = " " * 2 - format_specific_conf = "" - - if format.to_sym == :multiline - known_formats[:multiline].each do |key| - value = send(key) - if value.present? - format_specific_conf << "#{indent}#{key} /#{value}/\n" - end - end - else - extra_format_options.each do |key| - format_specific_conf << "#{indent}#{key} #{send(key)}\n" - end - end - - format_specific_conf - end - - def certain_format_line - case format - when "grok" - "format /#{grok.convert_to_regexp(grok_str).source.gsub("/", "\\/")}/ # grok: '#{grok_str}'" - when "regexp" - "format /#{regexp}/" - else - "format #{format}" - end - end - def grok @grok ||= begin