diff options
Diffstat (limited to 'lib/mauve/calendar_interface.rb')
-rw-r--r-- | lib/mauve/calendar_interface.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/mauve/calendar_interface.rb b/lib/mauve/calendar_interface.rb index 5282d79..f67c70b 100644 --- a/lib/mauve/calendar_interface.rb +++ b/lib/mauve/calendar_interface.rb @@ -5,10 +5,18 @@ module Mauve # Interface to the Bytemark calendar. # - class CalendarInterface < GenericHttpApiClient + class CalendarInterface class << self + include GenericHttpApiClient + + # return [Log4r::Logger] + def logger + @logger ||= Log4r::Logger.new(self.to_s) + end + + def get_attendees(klass, at=Time.now) # # Returns nil if no calendar_url has been set. @@ -63,11 +71,11 @@ module Mauve private - def get_yaml(url) + def do_get_yaml(url) resp = do_get(url) return (resp.is_a?(String) ? YAML.load(resp) : nil) - rescue StandardError => err + rescue StandardError => ex logger.error "Caught #{ex.class.to_s} (#{ex.to_s}) whilst querying #{url.to_s}." logger.debug err.backtrace.join("\n") nil |