From 8259dffd02975beddd91a69b086f94402e540ebd Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 17 Aug 2009 11:11:40 +0200 Subject: production logging enabled, put instead of post for dataset additions --- config.ru | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config.ru') diff --git a/config.ru b/config.ru index 920879d..85e510e 100644 --- a/config.ru +++ b/config.ru @@ -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 -- cgit v1.2.3