rack.git  about / heads / tags
a modular Ruby webserver interface
blob 77fb637deeac910278a0b31f92ab39bc25c1cd53 386 bytes (raw)
$ git show rack.io:lib/rack/nulllogger.rb	# shows this blob on the CLI

 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

git clone https://yhbt.net/rack.git