[DRE-commits] [gemwatch] 02/02: Revert "Implement error logging"
Antonio Terceiro
terceiro at moszumanska.debian.org
Thu Aug 6 14:59:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository gemwatch.
commit abde9e0289478a549bd94ef742c39e8f72a9eb36
Author: Antonio Terceiro <terceiro at debian.org>
Date: Thu Aug 6 11:56:05 2015 -0300
Revert "Implement error logging"
This reverts commit 98cc3f49c5a03340b125683906a30a8c835aaf27.
I couldn't make this work for some weird reason.
---
.gitignore | 1 -
gemwatch.rb | 16 ----------------
2 files changed, 17 deletions(-)
diff --git a/.gitignore b/.gitignore
index e6dd0a9..5d029b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
*.swp
tmp/download/
-tmp/log/
.bundle
diff --git a/gemwatch.rb b/gemwatch.rb
index 3cb00e8..8cdef97 100644
--- a/gemwatch.rb
+++ b/gemwatch.rb
@@ -4,7 +4,6 @@ require 'sinatra'
require 'haml'
require 'restclient'
require 'json'
-require 'time'
begin
# alioth
@@ -20,7 +19,6 @@ require 'open-uri'
DOWNLOAD_BASE = File.join(File.dirname(__FILE__), 'tmp', 'download')
ASSETS_BASE = File.join(File.dirname(__FILE__), 'public')
-LOG_BASE = File.join(File.dirname(__FILE__), 'tmp', 'log')
module GemWatch
class << self
@@ -200,19 +198,5 @@ not_found do
end
error 500 do
- now = Time.now
- log = File.join(LOG_BASE, now.strftime('%Y/%m/%d.log'))
- FileUtils.mkdir_p(File.dirname(log))
- error = env['sinatra.error']
-
- File.open(log, 'a') do |f|
- f.flock(File::LOCK_EX)
- f.puts(now.to_s + ": " + error.message)
- f.puts('-' * 72)
- f.puts(error.backtrace)
- f.puts
- f.flock(File::LOCK_UN)
- end
-
haml :error
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gemwatch.git
More information about the Pkg-ruby-extras-commits
mailing list