Log to thread.