orocos-toolchain / utilrb

A small set of useful Ruby classes and extensions
Other
2 stars 13 forks source link

logger: include the superclass when resolving the default logger #34

Closed doudou closed 7 years ago

doudou commented 7 years ago

The following setup

   module WithLogger
      extend Logger::Root(...)
      class Base
         extend Logger::Hierarchy
      end
   end

   module NoLogger
      class Derived < Base
          extend Logger::Hierarchy
      end
   end

was not considering Base's logger, which is really unexpected. It would instead go directly to WithLogging's logger.

This commit adds Base in the search order.