improved logging of broker-related functions