Actions
Defect #44010
openToo much INFO log of asset paths when starting Rails
Resolution:
Affected version:
Description
Hi,
I would like to report a very long INFO-level log message that appears every time the Rails application starts.
It looks like this:
I, [2026-04-30T16:51:43.780974 #368] INFO -- : [ #<Pathname:/usr/src/redmine/app/assets/fonts>, #<Pathname:/usr/src/redmine/app/assets/images>, #<Pathname:/usr/src/redmine/app/assets/javascripts>, #<Pathname:/usr/src/redmine/app/assets/stylesheets>, ... ]
This message comes from the following code in lib/redmine/asset_path.rb :
def asset_files
Enumerator.new do |y|
Rails.logger.info all_paths # ← this line
Since this is only useful for debugging, I suggest changing the log level from INFO to DEBUG .
Here is the suggested patch:
--- a/lib/redmine/asset_path.rb
+++ b/lib/redmine/asset_path.rb
@@ -141,7 +141,7 @@ module Redmine
def asset_files
Enumerator.new do |y|
- Rails.logger.info all_paths
+ Rails.logger.debug { all_paths.inspect }
all_paths.each do |path|
next unless path.exist?
Hope this change can be adopted. Thanks!
Related issues
Updated by Go MAEDA about 13 hours ago
- Related to Feature #39111: Enable Asset Pipeline Integration using Propshaft added
Updated by Go MAEDA about 13 hours ago
- Tracker changed from Patch to Defect
- Category changed from Ruby support to Code cleanup/refactoring
- Status changed from New to Confirmed
- Target version set to 6.0.10
Thank you for posting the patch. I agree that the log is unnecessary in normal operations.
I am setting the target version to 6.0.10.
Actions