Register log handler also in tests (to fix no handler warnings)