MQTT log client_identifier

I want to log the client_identifier when a mqtt tcp connection comes in. What can I do to do it? Can not find any help anywhere.