Class: RequestLogAnalyzer::FileFormat::W3c::Request

Inherits:
Request
  • Object
show all
Defined in:
lib/request_log_analyzer/file_format/w3c.rb

Instance Attribute Summary

Attributes inherited from Request

#attributes, #file_format, #lines

Instance Method Summary collapse

Methods inherited from Request

#<<, #add_line_hash, #add_parsed_line, #completed?, create, #empty?, #every, #first, #first_lineno, #has_line_type?, #initialize, #last_lineno, #timestamp, #validate

Methods included from Request::Converters

#convert_decimal, #convert_duration, #convert_epoch, #convert_eval, #convert_float, #convert_int, #convert_integer, #convert_nillable_string, #convert_path, #convert_string, #convert_sym, #convert_symbol, #convert_traffic, #convert_value, #sanitize_parameters

Constructor Details

This class inherits a constructor from RequestLogAnalyzer::Request

Instance Method Details

#convert_timestamp(value, _definition) ⇒ Object

Do not use DateTime.parse, but parse the timestamp ourselves to return a integer to speed up parsing.



46
47
48
# File 'lib/request_log_analyzer/file_format/w3c.rb', line 46

def convert_timestamp(value, _definition)
  "#{value[0, 4]}#{value[5, 2]}#{value[8, 2]}#{value[11, 2]}#{value[14, 2]}#{value[17, 2]}".to_i
end