File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
src/main/ruby/jruby/rack/rails Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1+ require 'active_support/logger_silence'
2+
3+ module JRuby
4+ module Rack
5+ class RailsLogger < JRuby ::Rack ::Logger
6+ include ActiveSupport ::LoggerSilence
7+
8+ def info ( *args )
9+ return unless info?
10+
11+ super ( *args )
12+ end
13+ end
14+ end
15+ end
Original file line number Diff line number Diff line change 88
99require 'rails/railtie'
1010require 'pathname'
11+ require 'jruby/rack/rails/rails_logger'
1112
1213module JRuby ::Rack
1314 class Railtie < ::Rails ::Railtie
@@ -37,7 +38,9 @@ class Railtie < ::Rails::Railtie
3738
3839 initializer 'set_servlet_logger' , :before => :initialize_logger do |app |
3940 app . config . logger ||= begin
40- config = app . config ; logger = JRuby ::Rack . logger
41+ config = app . config
42+ logger = RailsLogger . new
43+ JRuby ::Rack . logger = logger
4144 log_level = config . log_level || :info
4245 logger . level = logger . class . const_get ( log_level . to_s . upcase )
4346 log_formatter = config . log_formatter if config . respond_to? ( :log_formatter ) # >= 4.0
You can’t perform that action at this time.
0 commit comments