From 58a4e153cbe073e3c22a0b122326f5f5521a8bf6 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 10 Sep 2009 15:05:24 +0200 Subject: working version with new webservices --- config.ru | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'config.ru') diff --git a/config.ru b/config.ru index 95e58ae..02ca8b3 100644 --- a/config.ru +++ b/config.ru @@ -2,11 +2,9 @@ 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 +FileUtils.mkdir_p 'log' unless File.exists?('log') +log = File.new("log/#{ENV["RACK_ENV"]}.log", "a") +$stdout.reopen(log) +$stderr.reopen(log) run Sinatra::Application -- cgit v1.2.3