aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2013-04-07 04:54:21 -0400
committerTeddy Wing2013-04-07 04:54:21 -0400
commit51a213997274ce7581f10fa8e8ef2edd90e38a34 (patch)
treebbf1d1e6ea491c32d818fe55c85bff0e6f262b27
parent522a81bd1b9f6b79bb4aa38c0e4847835efe1364 (diff)
downloadclips-51a213997274ce7581f10fa8e8ef2edd90e38a34.tar.bz2
Add some logging
-rw-r--r--.gitignore5
-rw-r--r--config.ru5
2 files changed, 9 insertions, 1 deletions
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)