aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/mauve_thread.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-06-15 19:44:07 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-06-15 19:44:07 +0100
commit42f14de6ab50d0e05f49f038e40b94b686701bf1 (patch)
tree33dc459cf3ae32de8956690a990f080321a67a83 /lib/mauve/mauve_thread.rb
parent92e5d4e652aae161640359b41c0ba8dcaedac0ad (diff)
* Added Alert#subject to return source when subject unspecified
* Added extra arg to acknowledge! * Alert#all_raised / all_cleared does not returned ack'd alerts * Added sanitising for source/subject * Catch empty alert_group notifications in AlertChanged * Tidied up alert_group * Added skip bytemark_auth when RACK_ENV is development * Tidied up logging in MauveThread, Timer, UdpServer * Added extra convenience methods to Time and Date * Moved working/daylight/dead_zone hours into Time
Diffstat (limited to 'lib/mauve/mauve_thread.rb')
-rw-r--r--lib/mauve/mauve_thread.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mauve/mauve_thread.rb b/lib/mauve/mauve_thread.rb
index bd036db..3aba6fe 100644
--- a/lib/mauve/mauve_thread.rb
+++ b/lib/mauve/mauve_thread.rb
@@ -9,7 +9,7 @@ module Mauve
end
def logger
- Log4r::Logger.new(self.class.to_s)
+ @logger ||= Log4r::Logger.new(self.class.to_s)
end
def run_thread(interval = 0.2)
@@ -68,6 +68,7 @@ module Mauve
end
def start
+ @logger = nil
logger.debug("Starting")
@stop = false
@thread = Thread.new{ self.run_thread { self.main_loop } }