Skip to content

Instantly share code, notes, and snippets.

@technicalpickles
Forked from bryanl/gist:1204341
Created September 8, 2011 19:27
Show Gist options
  • Save technicalpickles/1204433 to your computer and use it in GitHub Desktop.
Save technicalpickles/1204433 to your computer and use it in GitHub Desktop.
%w(debug? info? warn? error? fatal?).map(&:to_sym).each do |level|
define_method level do
non_nil_loggers = @loggers.find_all{|l| l.level}
matching_loggers = non_nil_loggers.map{|l| l.send(level)}
matching_loggers.any?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment