def get_docker_container_json_logs_path(long_id, inspect=None):
    # First try is the default location

    path = '/var/lib/docker/containers/%s/%s-json.log' % (long_id,
                                                          long_id)
    if os.path.isfile(path):
        return path

    # Second try is to get docker inspect LogPath

    if not inspect:
        inspect = exec_dockerinspect(long_id)

    path = inspect['LogPath']

    if path == '<no value>' or not os.path.isfile(path):
        path = inspect['HostnamePath']

    if path == '<no value>':
        raise IOError(
            'Container %s does not have a docker inspect .HostnamePath' %
            long_id)

    path = os.path.join(os.path.dirname(path), '%s-json.log'
                        % long_id)

    if os.path.isfile(path):
        return path
Returns the path to a container (with ID=long_id) docker logs file in the
dataset/ETHPy150Open cloudviz/agentless-system-crawler/crawler/dockerutils.py/get_docker_container_json_logs_path