add event logging function
two tracing tools added, 1. log events to files, 2. printf