Class: Fluentd::Setting::FilterGrep

Inherits:
Object
  • Object
show all
Includes:
Plugin
Defined in:
app/models/fluentd/setting/filter_grep.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from PluginParameter

#advanced_options, #all_options, #column_type, #create_buffer, #create_formatter, #create_parser, #create_storage, #default, #desc, #have_buffer_section?, #have_format_section?, #have_parse_section?, #have_storage_section?, #list_of

Methods included from Configurable

#initialize

Methods included from PluginConfig

#config_element, #parse_attributes, #skip?, #to_config, #validate_configuration

Class Method Details

.initial_paramsObject



8
9
10
11
# File 'app/models/fluentd/setting/filter_grep.rb', line 8

def self.initial_params
  {
  }
end

.permit_paramsObject



13
14
15
16
17
18
19
20
# File 'app/models/fluentd/setting/filter_grep.rb', line 13

def self.permit_params
  [
    :label,
    :pattern, :log_level, :@log_level,
    { and: {regexp: [:key, :pattern], exclude: [:key, :pattern]} },
    { or: {regexp: [:key, :pattern], exclude: [:key, :pattern]} }
  ]
end

Instance Method Details

#common_optionsObject



22
23
24
25
26
27
# File 'app/models/fluentd/setting/filter_grep.rb', line 22

def common_options
  [
    :label,
    :pattern,
  ]
end

#hidden_optionsObject



29
30
31
32
33
34
35
# File 'app/models/fluentd/setting/filter_grep.rb', line 29

def hidden_options
  regexps = (1..20).map {|n| :"regexp#{n}"}
  excludes = (1..20).map {|n| :"exclude#{n}"}
  [
    *regexps, *excludes, :regexp, :exclude, :and, :or
  ]
end