lib/request_log_analyzer/controller.rb in request-log-analyzer-1.2.7 vs lib/request_log_analyzer/controller.rb in request-log-analyzer-1.2.8
- old
+ new
@@ -44,10 +44,14 @@
options[:output] = output_class.new(STDOUT, :width => arguments[:report_width].to_i,
:color => !arguments[:boring], :characters => (arguments[:boring] ? :ascii : :utf))
end
# Create the controller with the correct file format
- file_format = RequestLogAnalyzer::FileFormat.load(arguments[:format])
+ file_format = if arguments[:apache_format]
+ RequestLogAnalyzer::FileFormat.load(:apache, arguments[:apache_format])
+ else
+ RequestLogAnalyzer::FileFormat.load(arguments[:format])
+ end
# register sources
if arguments.parameters.length == 1
file = arguments.parameters[0]
if file == '-' || file == 'STDIN'