puppetlabs/hiera — pull request #117 by zaphod42 (2013-02-20 17:26:17+00:00)
Title: (#18718) Fallback to Console if Puppet not available

Sometimes a logger has been configured, but is not suitable for being
used. An example of this is when the puppet logger has been configured,
but hiera is not being used inside puppet. This adds a FallbackLogger that
will choose among the provided loggers for one that is suitable.

The new FallbackLogger assumes a new method on loggers called #suitable?. This
method, if present, returns true if the logger will work and false if it
won't work. If there is no #suitable? method, then the FallbackLogger
assumes that the logger is suitable, which is for backwards compatiblity
with existing loggers.