Utility for capturing trace events to the log