Kouhei Sutou
null+****@clear*****
Mon Jan 5 13:48:16 JST 2015
Kouhei Sutou 2015-01-05 13:48:16 +0900 (Mon, 05 Jan 2015) New Revision: df3e4f3311575c7e13dbc680d7e9b469eb565c46 https://github.com/droonga/droonga-engine/commit/df3e4f3311575c7e13dbc680d7e9b469eb565c46 Message: droonga-engine: don't use log file by default Modified files: lib/droonga/command/droonga_engine.rb Modified: lib/droonga/command/droonga_engine.rb (+9 -5) =================================================================== --- lib/droonga/command/droonga_engine.rb 2015-01-05 13:38:50 +0900 (619a620) +++ lib/droonga/command/droonga_engine.rb 2015-01-05 13:48:16 +0900 (a4fe405) @@ -214,15 +214,19 @@ module Droonga end def default_log_file_path - Path.default_log_file + nil end def default_pid_file_path nil end - def expand_path(path) - Pathname.new(path).expand_path + def normalize_path(path) + if path == "-" + nil + else + Pathname.new(path).expand_path + end end def config @@ -282,7 +286,7 @@ module Droonga parser.on("--log-file=FILE", "Output logs to FILE", "(#{default_log_file_path})") do |path| - @log_file_path = expand_path(path) + @log_file_path = normalize_path(path) end end @@ -299,7 +303,7 @@ module Droonga end parser.on("--pid-file=PATH", "Put PID to PATH") do |path| - @pid_file_path = expand_path(path) + @pid_file_path = normalize_path(path) end end -------------- next part -------------- HTML����������������������������... 下载