Configuriation hierarchy, generalize logging

Hi all, could you consider attached commits please?  I'll be able to fix
if something goes wrong.  Any comment is welcomed.  Thanks!

Pavel

Edit:  I have fixed some problems I created.  Fixes are in my repo.  Feel
free to fast-forward to my head if you think that everything is OK.