Improve the logging system.

Implemented dynamic selection of the most specific logger by responder
and method name.