Class: RequestLogAnalyzer::FileFormat::Merb::Request
- Defined in:
- lib/request_log_analyzer/file_format/merb.rb
Constant Summary collapse
- MONTHS =
{'Jan' => '01', 'Feb' => '02', 'Mar' => '03', 'Apr' => '04', 'May' => '05', 'Jun' => '06', 'Jul' => '07', 'Aug' => '08', 'Sep' => '09', 'Oct' => '10', 'Nov' => '11', 'Dec' => '12' }
Instance Attribute Summary
Attributes inherited from Request
#attributes, #file_format, #lines
Instance Method Summary collapse
-
#convert_timestamp(value, definition) ⇒ Object
Speed up timestamp conversion.
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_eval, #convert_float, #convert_int, #convert_integer, #convert_string, #convert_sym, #convert_symbol, #convert_traffic, #convert_value
Constructor Details
This class inherits a constructor from RequestLogAnalyzer::Request
Instance Method Details
#convert_timestamp(value, definition) ⇒ Object
Speed up timestamp conversion
61 62 63 |
# File 'lib/request_log_analyzer/file_format/merb.rb', line 61 def (value, definition) "#{value[26,4]}#{MONTHS[value[4,3]]}#{value[8,2]}#{value[11,2]}#{value[14,2]}#{value[17,2]}".to_i end |