differentiate logging depending on whether an exchange or a queue is looked up or created