Logger
我在 JRuby on Rails 应用程序中遇到问题。一个线程将日志级别更改为错误,并且不会变回。这个代码是线程安全的,还是我应该寻找它发生的其他地方?
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/benchmarkable.rb#L50
def silence
message = "ActiveSupport::Benchmarkable#silence is deprecated. It will be removed from Rails 4.1."
ActiveSupport::Deprecation.warn message
old_logger_level, logger.level = logger.level, ::Logger::ERROR if logger
yield
ensure
logger.level = old_logger_level if logger
end