Kouhei Sutou
null+****@clear*****
Mon May 21 13:59:17 JST 2018
Kouhei Sutou 2018-05-21 13:59:17 +0900 (Mon, 21 May 2018) New Revision: 3cc2bdfc2ac326ba145e161985447d8bdf9955e7 https://github.com/groonga/groonga-query-log/commit/3cc2bdfc2ac326ba145e161985447d8bdf9955e7 Message: groonga-query-log-extract: Add --no-include-arguments Modified files: lib/groonga-query-log/command/extract.rb Modified: lib/groonga-query-log/command/extract.rb (+11 -1) =================================================================== --- lib/groonga-query-log/command/extract.rb 2018-04-05 10:46:12 +0900 (36a4b14) +++ lib/groonga-query-log/command/extract.rb 2018-05-21 13:59:17 +0900 (a7cd97e) @@ -79,6 +79,7 @@ module GroongaQueryLog @options.unify_format = nil @options.commands = [] @options.exclude_commands = [] + @options.include_arguments = true @options.output_path = nil @option_parser = OptionParser.new do |parser| parser.version = VERSION @@ -121,6 +122,12 @@ module GroongaQueryLog end end + parser.on("--[no-]include-arguments", + "Whether include command arguments", + "[#{@options.include_arguments}]") do |include_arguments| + @options.include_arguments = include_arguments + end + parser.on("--output=PATH", "Output to PATH.", "[standard output]") do |path| @@ -139,6 +146,9 @@ module GroongaQueryLog def extract_command(statistic, output) command = statistic.command return unless target?(command) + unles****@optio*****_arguments + command.arguments.clear + end command_text = nil case****@optio*****_format when "uri" @@ -146,7 +156,7 @@ module GroongaQueryLog when "command" command_text = command.to_command_format else - command_text = statistic.raw_command + command_text = command.to_s end output.puts(command_text) end -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180521/cbc3fb97/attachment-0001.htm