Class: Dexter::SqlLogParser

Inherits:
LogParser show all
Defined in:
lib/dexter/parsers/sql_log_parser.rb

Constant Summary

Constants inherited from LogParser

LogParser::REGEX

Instance Method Summary collapse

Methods inherited from LogParser

#initialize

Constructor Details

This class inherits a constructor from Dexter::LogParser

Instance Method Details

#perform(collector) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/dexter/parsers/sql_log_parser.rb', line 3

def perform(collector)
  # TODO support streaming
  @logfile.read.split(";").each do |statement|
    statement = statement.strip
    collector.add(statement, 0) unless statement.empty?
  end
end