From 8cd4c500240b7dfccc00e4c70cfbc8730750920e Mon Sep 17 00:00:00 2001 From: songtianlun Date: Tue, 28 Jan 2025 01:28:07 +0800 Subject: [PATCH] fix: update log level for user agent logging - Change logging to use Rails.logger.debug instead of Rails.logger.debugger for better compatibility. - Remove unnecessary extra lines in the Sidekiq jobs file. This commit ensures that log messages are recorded efficiently and with the correct log level, improving logging practices in the application. --- app/admin/sidekiq_jobs.rb | 2 ++ app/controllers/application_controller.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/admin/sidekiq_jobs.rb b/app/admin/sidekiq_jobs.rb index a342795..5fcb140 100644 --- a/app/admin/sidekiq_jobs.rb +++ b/app/admin/sidekiq_jobs.rb @@ -65,6 +65,8 @@ ActiveAdmin.register_page "Sidekiq Tasks" do end end end + + end end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8421f74..7fb8d85 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -52,7 +52,7 @@ class ApplicationController < ActionController::Base def log_browser_info # 构建详细的浏览器信息 - Rails.logger.debugger "User Agent: #{request.user_agent}" + Rails.logger.debug "User Agent: #{request.user_agent}" # 如果是被拦截的浏览器,记录额外信息 # unless browser_allowed?