diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2015-10-22 20:44:42 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2015-10-22 20:44:42 +0900 |
commit | b579a2e34e8cc2bb26250d954af6ed24fadeda45 (patch) | |
tree | 97174cb1b09db38839ba9bdf9422eced78b644ed | |
parent | 3075a3e1432158f0e5b29d035affb67e50b1226b (diff) | |
download | plum-b579a2e34e8cc2bb26250d954af6ed24fadeda45.tar.gz |
server: wrap the passed app with Rack::CommonLogger if debug mode
-rw-r--r-- | lib/plum/rack/server.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plum/rack/server.rb b/lib/plum/rack/server.rb index 15cb10a..1e444c0 100644 --- a/lib/plum/rack/server.rb +++ b/lib/plum/rack/server.rb @@ -3,7 +3,7 @@ module Plum class Server def initialize(app, config) @state = :null - @app = app + @app = config[:debug] ? ::Rack::CommonLogger.new(app) : app @logger = Logger.new(config[:log] || $stdout).tap { |l| l.level = config[:debug] ? Logger::DEBUG : Logger::INFO } |