log when blue logo shows up

This commit is contained in:
Carl Chenet 2017-05-23 14:18:03 +02:00
parent 49dd502de2
commit 44774bae6d

View file

@ -54,7 +54,10 @@ class ApplicationController < ActionController::Base
end end
intensity = (@traffic * 7).floor + 50.0 intensity = (@traffic * 7).floor + 50.0
color = rand(2000000) == 1 ? "0000%02x" : "%02x0000" if (blue = (rand(2000000) == 1)) && @user
Rails.logger.info " User #{@user.id} (#{@user.username}) saw blue logo"
end
color = (blue ? "0000%02x" : "%02x0000")
@traffic_color = sprintf(color, intensity > 255 ? 255 : intensity) @traffic_color = sprintf(color, intensity > 255 ? 255 : intensity)
true true