From 44774bae6d1dc06cce327b849f3c4a59e3cb753c Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Tue, 23 May 2017 14:18:03 +0200 Subject: [PATCH] log when blue logo shows up --- app/controllers/application_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f62d64a..f3db4cb 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -54,7 +54,10 @@ class ApplicationController < ActionController::Base end 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) true