File: nulllogger.rb

package info (click to toggle)
ruby-rack 1.5.2-3%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 1,340 kB
  • ctags: 968
  • sloc: ruby: 12,617; sh: 12; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Rack
  class NullLogger
    def initialize(app)
      @app = app
    end

    def call(env)
      env['rack.logger'] = self
      @app.call(env)
    end

    def info(progname = nil, &block);  end
    def debug(progname = nil, &block); end
    def warn(progname = nil, &block);  end
    def error(progname = nil, &block); end
    def fatal(progname = nil, &block); end
  end
end