From 4020f892712305727fde8ebb68c0bd4898066485 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Tue, 28 Jan 2025 01:26:31 +0800 Subject: [PATCH] style: change logging level for user agent - Replace logger.info with logger.debugger for user agent logging. - Commented out redundant info logging for blocked browsers. This change improves the logging detail level for the user agent by utilizing the debugger log method instead of info, which provides more context during debugging sessions. --- app/controllers/application_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f41cc78..8421f74 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -52,11 +52,11 @@ class ApplicationController < ActionController::Base def log_browser_info # 构建详细的浏览器信息 - Rails.logger.info "User Agent: #{request.user_agent}" + Rails.logger.debugger "User Agent: #{request.user_agent}" # 如果是被拦截的浏览器,记录额外信息 # unless browser_allowed? - # Rails.logger.warn "Browser Blocked: #{browser_info.to_json}" + # Rails.logger.info "User Agent: #{request.user_agent}" # end end