Improve logging trace messages with use of better api