From 62ae5207d6dd5f1bd293eaf777d4d0d61e0409c9 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 17 Aug 2009 11:14:17 +0200 Subject: production logging enabled, predictions working with documented algorithm --- config.ru | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config.ru') diff --git a/config.ru b/config.ru index 0cc3dc6..95e58ae 100644 --- a/config.ru +++ b/config.ru @@ -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 -- cgit v1.2.3