mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-11 16:57:11 +02:00
Remove unused methods
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
1cd2282212
commit
fe32983c0f
@ -31,43 +31,6 @@ class Fluentd
|
|||||||
end
|
end
|
||||||
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
|
def grok
|
||||||
@grok ||=
|
@grok ||=
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user