Log exceptions when they are produced