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:
parent
29de36f5fb
commit
4020f89271
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user