Add log_print support to test/thread.