logging separately for each thread.