Kouhei Sutou
null+****@clear*****
Thu Mar 8 11:51:51 JST 2018
Kouhei Sutou 2018-03-08 11:51:51 +0900 (Thu, 08 Mar 2018) New Revision: c85c59b992e4dec2fddb387a409c3d0dd16f9f21 https://github.com/groonga/groonga-log/commit/c85c59b992e4dec2fddb387a409c3d0dd16f9f21 Message: Use Symbol Modified files: lib/groonga-log/parser.rb Modified: lib/groonga-log/parser.rb (+11 -10) =================================================================== --- lib/groonga-log/parser.rb 2018-03-08 11:51:07 +0900 (1f09ece) +++ lib/groonga-log/parser.rb 2018-03-08 11:51:51 +0900 (d4398d0) @@ -73,18 +73,19 @@ module GroongaLog entry = Entry.new - year = Integer(match_data["year"], 10) - month = Integer(match_data["month"], 10) - day = Integer(match_data["day"], 10) - hour = Integer(match_data["hour"], 10) - minute = Integer(match_data["minute"], 10) - second = Integer(match_data["second"], 10) - micro_second = Integer(match_data["micro_second"], 10) + year = Integer(match_data[:year], 10) + month = Integer(match_data[:month], 10) + day = Integer(match_data[:day], 10) + hour = Integer(match_data[:hour], 10) + minute = Integer(match_data[:minute], 10) + second = Integer(match_data[:second], 10) + micro_second = Integer(match_data[:micro_second], 10) entry.timestamp = Time.local(year, month, day, hour, minute, second, micro_second) - entry.log_level = log_level_to_symbol(match_data["log_level"]) - entry.pid = Integer(match_data["pid"], 10) if match_data["pid"] - entry.message = match_data["message"] + entry.log_level = log_level_to_symbol(match_data[:log_level]) + pid = match_data[:pid] + entry.pid = Integer(pid, 10) if pid + entry.message = match_data[:message] yield entry end end -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180308/2f0cd151/attachment-0001.htm