diff options
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/control | 8 | ||||
-rw-r--r-- | lib/mauve/alert.rb | 9 | ||||
-rw-r--r-- | lib/mauve/http_server.rb | 2 |
4 files changed, 24 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index f65d084..80f6124 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mauvealert (3.0.1) stable; urgency=low + + * Fixed up logging for the web interface + * Added better catch for validation errors + + -- Patrick J Cherry <patrick@bytemark.co.uk> Tue, 19 Apr 2011 10:18:44 +0100 + mauvealert (3.0.0) stable; urgency=low * New version. diff --git a/debian/control b/debian/control index cd2bcd8..10aa05e 100644 --- a/debian/control +++ b/debian/control @@ -30,7 +30,15 @@ Depends: mauvealert-common, libsinatra-ruby1.8, libuuidtools-ruby1.8, libwebrick-ruby1.8, + libdm-core-ruby1.8, + libdm-do-adapter-ruby1.8, + libdm-migrations-ruby1.8, + libdm-serializer-ruby1.8, libdm-sqlite-adapter-ruby1.8, + libdo-sqlite3-ruby1.8, + libdm-timestamps-ruby1.8, + libdm-types-ruby1.8, + libdm-validations-ruby1.8, thin1.8, libxmpp4r-ruby1.8, ${misc:Depends} diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb index 374762d..a95f761 100644 --- a/lib/mauve/alert.rb +++ b/lib/mauve/alert.rb @@ -369,7 +369,14 @@ module Mauve alert_db.update_type = :changed end - logger.error "Couldn't save update #{alert} because of #{alert_db.errors}" unless alert_db.save + if !alert_db.save + if alert_db.errors.respond_to?("full_messages") + msg = alert_db.errors.full_messages + else + msg = alert_db.errors.inspect + end + logger.error "Couldn't save update #{alert} because of #{msg}" unless alert_db.save + end end # If this is a complete replacement update, find the other alerts diff --git a/lib/mauve/http_server.rb b/lib/mauve/http_server.rb index b4ced32..69b566b 100644 --- a/lib/mauve/http_server.rb +++ b/lib/mauve/http_server.rb @@ -94,7 +94,7 @@ module Mauve end def main_loop - @server = ::Thin::Server.new(@ip, @port, Rack::CommonLogger.new(Rack::Chunked.new(Rack::ContentLength.new(WebInterface.new)), RackErrorsProxy.new(@logger)), :signals => false) + @server = ::Thin::Server.new(@ip, @port, Rack::CommonLogger.new(Rack::Chunked.new(Rack::ContentLength.new(WebInterface.new)), RackErrorsProxy.new(logger)), :signals => false) @server.start end |