lib/backburner/logger.rb in backburner-0.0.1 vs lib/backburner/logger.rb in backburner-0.0.2
- old
+ new
@@ -18,25 +18,31 @@
ms = (ellapsed.to_f * 1000).to_i
log "Finished #{name} in #{ms}ms #{failed ? ' (failed)' : ''}"
end
# Prints message about failure when beastalk cannot be connected
- # failed_connection(ex)
+ #
+ # @example
+ # failed_connection(ex)
def failed_connection(e)
log_error exception_message(e)
log_error "*** Failed connection to #{connection.url}"
log_error "*** Check that beanstalkd is running (or set a different beanstalk url)"
exit 1
end
# Print a message to stdout
- # log("Working on task")
+ #
+ # @example
+ # log("Working on task")
def log(msg)
puts msg
end
# Print an error to stderr
- # log_error("Task failed!")
+ #
+ # @example
+ # log_error("Task failed!")
def log_error(msg)
$stderr.puts msg
end
end
\ No newline at end of file