Commit Graph

10 Commits

Author SHA1 Message Date
Tyler Brock a3555ba404 minor: logger fix for mocha tests that expect an non-hash argument 2012-06-01 15:16:05 -04:00
asinbow.wang 56968e8ad3 fix log debug level detect
* reason
  there hardcodes DEBUG_LEVEL in logging.rb:
    DEBUG_LEVEL = defined?(Logger) ? Logger::DEBUG : 0
  this could cause some incompatibility between different logger tools

  for Logger, DEBUG/0 < INFO/1 < WARN/2 < ERROR/3 < FATAL/4,
  for Log4r,  ALL/0 < DETAIL/1 < DEBUG/2 < INFO/3 < WARN/4 < ERROR/5 < FATAL/6.

  anyway, it is not in good pattern.

* suggestion
  logger.debug { ... }
  if current level is greater than DEBUG, the block will not be
  evaluated. it is also efficient.

  following is also supported by most loggers.
  logger.info { ... }
  logger.warn { ... }
  logger.error { ... }
  ...
2012-04-27 15:26:49 +08:00
Tyler Brock 5fde3de4a6 RUBY-417 only show logging warning if level is :debug 2012-03-07 14:15:10 -05:00
Tyler Brock 038cbea739 Revert "Solves: "gems/mongo-1.6.0/lib/mongo/util/logging.rb:34:in `instrument': undefined method `level' for #<Mongoid::Logger:0x00000103ca7570> (NoMethodError)""
This reverts commit 775ed49e6c.

a logger should quack like a logger
2012-02-23 11:53:18 -05:00
Armin Pašalić 775ed49e6c Solves: "gems/mongo-1.6.0/lib/mongo/util/logging.rb:34:in `instrument': undefined method `level' for #<Mongoid::Logger:0x00000103ca7570> (NoMethodError)" 2012-02-22 21:26:59 +01:00
Kyle Banker b79d408a11 Enable log duration by default for :debug-level logging. 2012-02-16 14:01:09 -05:00
Cyril Mougel 84c8e7cae2 add log_duration system to add time spend in database 2012-02-03 18:02:14 +01:00
Kyle Banker 6345820eae RUBY-345 update logging startup message 2011-11-15 15:59:42 -05:00
Kyle Banker 83eaa4d51b Replica Set connection improvements for refresh and multi-threaded apps. 2011-09-13 17:50:01 -04:00
Kyle Banker 701bba8942 RUBY-306 added missing file 2011-09-11 12:08:26 -04:00