Error objects not being properly sent to log targets