lib/loggr.rb in emissary-ruby-0.0.6 vs lib/loggr.rb in emissary-ruby-0.0.7
- old
+ new
@@ -70,11 +70,11 @@
file_lines.each_with_index do |line, i|
if line.include? @condition
if @messages["#{file_lines[i+1]}"].nil?
@last_id += 1
@messages["#{file_lines[i+1]}"] = {
- id: "#{@alias}-#{@last_id}",
+ id: "#{Emissary.server_name}-#{@alias}-#{@last_id}",
trigger: "Completed 500 Internal Server Error",
lines: file_lines[i..(i+@lines)],
count: 1,
reported: false,
index: i
@@ -91,10 +91,10 @@
return v if v[:id] == id
end
end
def last_message
- message_by_id("#{@alias}-#{@last_id}")
+ message_by_id("#{Emissary.server_name}-#{@alias}-#{@last_id}")
end
def lines_to_code(message)
"#{message[:lines].join("\n")}"
end