Logging Take 2

This is a much cleaner implementation it allows us to reuse the
log error listener from other saxon transformers.