From 51a213997274ce7581f10fa8e8ef2edd90e38a34 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 7 Apr 2013 04:54:21 -0400 Subject: Add some logging --- .gitignore | 5 ++++- config.ru | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 786b3f9..ce7342a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,7 @@ vendor/ # Database config/database.yml -db/*.sqlite3 \ No newline at end of file +db/*.sqlite3 + +# Logs +*.log \ No newline at end of file diff --git a/config.ru b/config.ru index 9bd3e16..59ad694 100644 --- a/config.ru +++ b/config.ru @@ -9,3 +9,8 @@ environment = ENV['DATABASE_URL'] ? 'production' : 'development' Camping::Models::Base.establish_connection dbconfig[environment] Clip.create if Clip.respond_to? :create + +# Log +log = File.new("#{ENV['RACK_ENV']}.log", 'a+') +$stdout.reopen(log) +$stderr.reopen(log) -- cgit v1.2.3