diff options
author | Christoph Helma <helma@in-silico.de> | 2009-08-17 11:11:40 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2009-08-17 11:11:40 +0200 |
commit | 8259dffd02975beddd91a69b086f94402e540ebd (patch) | |
tree | 00c63b84caa3458b2f4bfea9a6391dcfbfe3f2e9 /config.ru | |
parent | af0d1ebb1511ca4da47b4c69db7b6861a8fa3d70 (diff) |
production logging enabled, put instead of post for dataset additions
Diffstat (limited to 'config.ru')
-rw-r--r-- | config.ru | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1,5 +1,12 @@ 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 |