Class: TokyoMetro::Rake::Log::Finder

Inherits:
LogFinder
  • Object
show all
Defined in:
lib/tokyo_metro/rake/log/finder.rb

Class Method Summary collapse

Class Method Details

.search_by(regexp, environment: :development, suffix: nil, read_length: 256 * 1024, number_of_lines: nil) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/tokyo_metro/rake/log/finder.rb', line 3

def self.search_by(
  regexp ,
  environment: :development ,
  suffix: nil ,
  read_length: 256 * 1024 ,
  number_of_lines: nil
)
  filename = "#{ ::TokyoMetro::TOP_DIR }/log/#{ environment }.log"
  if suffix.present?
    filename += suffix.to_s
  end
  super( regexp , filename , read_length: read_length , number_of_files: number_of_files )
end