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.
This commit is contained in:
songtianlun 2025-01-28 01:26:31 +08:00
parent 29de36f5fb
commit 4020f89271

View File

@ -52,11 +52,11 @@ class ApplicationController < ActionController::Base
def log_browser_info def log_browser_info
# 构建详细的浏览器信息 # 构建详细的浏览器信息
Rails.logger.info "User Agent: #{request.user_agent}" Rails.logger.debugger "User Agent: #{request.user_agent}"
# 如果是被拦截的浏览器,记录额外信息 # 如果是被拦截的浏览器,记录额外信息
# unless browser_allowed? # unless browser_allowed?
# Rails.logger.warn "Browser Blocked: #{browser_info.to_json}" # Rails.logger.info "User Agent: #{request.user_agent}"
# end # end
end end