1. 10 6月, 2016 1 次提交
  2. 12 2月, 2016 1 次提交
    • P
      Fix logger silencing for broadcasted loggers · 2518bda9
      Piotr Jakubowski 提交于
      Fix #23609
      
      Commit 629efb60 introduced thread safety to logger silencing but it
      didn't take into account the fact that the logger can be extended with
      broadcasting to other logger.
      
      This commit introduces local_level to broadcasting Module which enables
      broadcasted loggers to be properly silenced.
      2518bda9
  3. 06 1月, 2016 1 次提交
    • S
      [close #22917] Don't output to `STDOUT` twice · 3d10d9d6
      schneems 提交于
      When `rails console` or `rails server` are used along with a logger set to output to `STDOUT` then the contents will show up twice. This happens because the logger is extended with `ActiveSupportLogger.broadcast` with a destination of STDOUT even if it is already outputting to `STDOUT`.
      
      Previously PR #22592 attempted to fix this issue, but it ended up causing NoMethodErrors. A better approach than relying on adding a method and flow control is to inspect the log destination directly. For this `ActiveSupport::Logger.logger_outputs_to?` was introduced
      
      ```ruby
      logger = Logger.new(STDOUT)
      ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT)
      # => true
      ```
      
      To accomplish this we must look inside of an instance variable of standard lib's Logger `@logdev`. There is a related Ruby proposal to expose this method in a standard way: https://bugs.ruby-lang.org/issues/11955
      3d10d9d6
  4. 24 12月, 2015 1 次提交
    • C
      Fixes LoggerSilence#silence threadsafety · 629efb60
      Carl P. Corliss 提交于
      - uses instance defined level if no custom local log level defined
      - Keeps track of local log level per [ thread + object-instance ]
      - prevents memory leakage by removing local level hash key/value on #silence method exit
      - avoids the use of Thread local variables
      629efb60
  5. 22 12月, 2012 1 次提交
  6. 01 4月, 2012 2 次提交
  7. 06 1月, 2012 2 次提交
  8. 25 12月, 2011 1 次提交
  9. 20 12月, 2011 1 次提交
  10. 13 12月, 2011 1 次提交
  11. 10 12月, 2011 2 次提交
    • J
      Fix AS test suite. · cd7fbcbb
      José Valim 提交于
      cd7fbcbb
    • A
      * ActiveSupport::BufferedLogger#silence is deprecated. If you want to squelch · 04ef93da
      Aaron Patterson 提交于
          logs for a certain block, change the log level for that block.
      
      *   ActiveSupport::BufferedLogger#open_log is deprecated.  This method should
          not have been public in the first place.
      
      *   ActiveSupport::BufferedLogger's behavior of automatically creating the
          directory for your log file is deprecated.  Please make sure to create the
          directory for your log file before instantiating.
      
      *   ActiveSupport::BufferedLogger#auto_flushing is deprecated.  Either set the
          sync level on the underlying file handle like this:
      
              f = File.open('foo.log', 'w')
              f.sync = true
              ActiveSupport::BufferedLogger.new f
      
          Or tune your filesystem.  The FS cache is now what controls flushing.
      
      *   ActiveSupport::BufferedLogger#flush is deprecated.  Set sync on your
          filehandle, or tune your filesystem.
      04ef93da
  12. 25 10月, 2011 1 次提交
  13. 22 10月, 2011 1 次提交
  14. 11 5月, 2011 1 次提交
  15. 23 2月, 2011 1 次提交
  16. 20 7月, 2010 1 次提交
  17. 18 5月, 2010 1 次提交
  18. 16 5月, 2010 1 次提交
  19. 23 4月, 2009 1 次提交
  20. 29 3月, 2009 1 次提交
  21. 11 12月, 2008 1 次提交
  22. 30 8月, 2008 1 次提交
  23. 19 8月, 2008 1 次提交
  24. 31 3月, 2008 1 次提交
  25. 13 3月, 2008 1 次提交
  26. 05 1月, 2008 1 次提交
  27. 08 10月, 2007 1 次提交
  28. 05 10月, 2007 1 次提交
  29. 04 10月, 2007 1 次提交
  30. 28 9月, 2007 1 次提交
  31. 27 9月, 2007 1 次提交
  32. 26 9月, 2007 1 次提交