lib/conveyor/output.rb in gina-conveyor-0.2.3 vs lib/conveyor/output.rb in gina-conveyor-0.2.4
- old
+ new
@@ -1,17 +1,16 @@
require 'conveyor/output/console'
require 'conveyor/output/email'
require 'conveyor/output/logfile'
require 'conveyor/output/channel'
-require 'conveyor/output/campfire'
module Conveyor
module Output
MSGLVLS = {
- :debug => 1,
- :info => 10,
- :warning => 20,
+ :debug => 1,
+ :info => 10,
+ :warning => 20,
:error => 30,
:announce => 40
}
def should_log?(lvl, maxlvl = nil)
@@ -44,40 +43,39 @@
end
def info(*msg)
output(:info, *msg)
end
-
+
def warning(*msg)
output(:warning, *msg)
end
-
+
def error(*msg)
output(:error, *msg)
end
def debug(*msg)
output(:debug, *msg)
end
-
+
def announce(*msg)
output(:announce, *msg)
end
-
+
def output(msgtype, *msg)
return false unless should_log?(msgtype)
Console.write(msgtype, *msg)
Logfile.write(logfile, name, msgtype, *msg)
- Email.write(msgtype, *msg)
+ Email.write(msgtype, *msg)
Channel.instance.write(name, msgtype, *msg)
- Campfire.instance.write(name, msgtype, *msg)
end
-
+
def send_notifications
Email.mail
end
def notify(*emails)
Conveyor::Foreman.instance.notify_list << emails
end
end
-end
\ No newline at end of file
+end