Class: BinlogReaderCommand::Formats
- Defined in:
- lib/fluent/command/binlog_reader.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(argv = ARGV) ⇒ Formats
constructor
A new instance of Formats.
Constructor Details
#initialize(argv = ARGV) ⇒ Formats
Returns a new instance of Formats.
218 219 220 221 |
# File 'lib/fluent/command/binlog_reader.rb', line 218 def initialize(argv = ARGV) super end |
Instance Method Details
#call ⇒ Object
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/fluent/command/binlog_reader.rb', line 223 def call prefix = Fluent::Plugin::FORMATTER_REGISTRY.dir_search_prefix || 'formatter_' plugin_dirs = @options[:plugin] unless plugin_dirs.empty? plugin_dirs.each do |d| Dir.glob("#{d}/#{prefix}*.rb").each do |path| require File.absolute_path(path) end end end $LOAD_PATH.map do |lp| Dir.glob("#{lp}/#{prefix}*.rb").each do |path| require path end end puts Fluent::Plugin::FORMATTER_REGISTRY.map.keys end |