diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-13 16:02:50 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-13 16:02:50 +0100 |
commit | e140af144e987ff7f6d767f2dc48b9cf685803fd (patch) | |
tree | 4a01971890865b4b3ca837d563bc673cbb787de8 /lib/mauve/udp_server.rb | |
parent | d28af4ec946c6aa4b645b73cef47d7e0c680bc0d (diff) |
Big commit
* Added manpages for all binaries
* Added log-reopening for mauvealert-server, and logrotate snippet
* mauveserver now adds a user on install, and runs as that user
* Big logging tidy-up
* Alert subjects are only overwritten by the source, when the subject in the databse is empty
* Removed various attr_writer methods that were being redifined
* Added a notes box to the acknowledge form, but this doesn't work yet
Diffstat (limited to 'lib/mauve/udp_server.rb')
-rw-r--r-- | lib/mauve/udp_server.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/mauve/udp_server.rb b/lib/mauve/udp_server.rb index 59bc5bc..8649efe 100644 --- a/lib/mauve/udp_server.rb +++ b/lib/mauve/udp_server.rb @@ -15,6 +15,7 @@ module Mauve attr_accessor :ip, :port, :sleep_interval def initialize + super # # Set the logger up # @@ -49,7 +50,7 @@ module Mauve @socket.bind(@ip, @port) - logger.debug("Successfully opened UDP socket on #{@ip}:#{@port}") + logger.info("Successfully opened UDP socket on #{@ip}:#{@port}") end def close_socket @@ -59,10 +60,11 @@ module Mauve @socket.close rescue IOError => ex # Just in case there is some sort of explosion! - logger.debug("Caught IOError #{ex.to_s}") + logger.error "Caught IOError #{ex.to_s}" + logger.debug ex.backtrace.join("\n") end - logger.debug("Successfully closed UDP socket") + logger.info("Successfully closed UDP socket") end def main_loop |