def h2oinit_default_log_dir():
    tmpdir = tempfile.mkdtemp()
    try:
        h2o.init(strict_version_check=False, name="default_log", ice_root=tmpdir)
    except H2OConnectionError as e:  # some errors are okay like version mismatch
        print("error message type is {0} and the error message is {1}\n".format(e.__class__.__name__, e.args[0]))
    finally:
        assert os.path.exists(os.path.join(tmpdir, "h2ologs")) == True
        shutil.rmtree(tmpdir)
        h2o.cluster().shutdown()