Is this ruby on rails code thread safe? -


i have issue logger in jruby on rails app. 1 thread changes log level error , not change back. code threadsafe, or should other places happening?

https://github.com/rails/rails/blob/master/activesupport/lib/active_support/benchmarkable.rb#l50

def silence   message = "activesupport::benchmarkable#silence deprecated. removed 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 

ok, looks during yield in first thread other thread silence have logger.level set error, if other thread end after first one, set level error permanently.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -