From 38ef93103285284c110c8a93bc2a93dd78312c45 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 2 Mar 2009 14:29:05 -0300 Subject: [PATCH] ActionItem953: logging more information --- app/controllers/application.rb | 9 +++++++++ 1 file changed, 9 insertions(+), 0 deletions(-) diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 19d6c86..c07c542 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -2,6 +2,15 @@ # available in all controllers. class ApplicationController < ActionController::Base + def log_processing + super + return unless ENV['RAILS_ENV'] == 'production' + if logger && logger.info? + logger.info(" HTTP Referer: #{request.referer}") + logger.info(" User Agent: #{request.user_agent}") + end + end + helper :document helper :language -- libgit2 0.21.2