Unify exception logging