diff options
author | Christoph Helma <helma@in-silico.de> | 2009-08-17 11:07:58 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2009-08-17 11:07:58 +0200 |
commit | 348076444bb0c1b9e08eac5331685f5c7a5115d8 (patch) | |
tree | 17346c43e2c9c3718586b6893027d2305d1a242a | |
parent | 4cc81cb72c6c1495bcf481b5c781bcf9770ff898 (diff) |
production logging enabled
-rw-r--r-- | config.ru | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2,4 +2,11 @@ require 'rubygems' require 'sinatra' require 'application.rb' +if ENV["RACK_ENV"] == 'production' + FileUtils.mkdir_p 'log' unless File.exists?('log') + log = File.new("log/sinatra.log", "a") + $stdout.reopen(log) + $stderr.reopen(log) +end + run Sinatra::Application |