nulllogger.rb 386 B

123456789101112131415161718
  1. module Rack
  2. class NullLogger
  3. def initialize(app)
  4. @app = app
  5. end
  6. def call(env)
  7. env['rack.logger'] = self
  8. @app.call(env)
  9. end
  10. def info(progname = nil, &block); end
  11. def debug(progname = nil, &block); end
  12. def warn(progname = nil, &block); end
  13. def error(progname = nil, &block); end
  14. def fatal(progname = nil, &block); end
  15. end
  16. end