This topic provides answers to some frequently asked questions (FAQ) about the Log Service command-line interface (CLI).

What can I do if the TLSV1_ALERT_PROTOCOL_VERSION error occurs when I install the Log Service CLI.

Run the following command to upgrade pip and then retry the installation:
pip3 install pip -U

How do I view the logs of the Log Service CLI?

By default, the alerts and error messages of the CLI are saved in the ~/aliyunlogcli.log file. You can view the logs in this file.

Why am I unable to find the aliyunlog command?

This is because the link to the aliyunlog script file failed to be created in Linux or macOS. For example, to resolve this issue, you can perform the following steps to manually create a link to the aliyunlog script file in Linux:

  1. Run the following command to verify the installation directory of Python.
    which python
    The following result is returned by Linux:
    /usr/bin/python
  2. In the /usr/bin directory, create a script file named aliyunlog and add the following code:
    #!/usr/bin/python
    import re
    import sys
    from pkg_resources import load_entry_point
    
    if __name__ == '__main__':
        sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
        sys.exit(
            load_entry_point('aliyun-log-cli', 'console_scripts', 'aliyunlog')()
        )
  3. Run the aliyunlog --version command.
    If the following response is returned, the aliyunlog link is created.
    log-cli-v-0.1.17, log-python-sdk-v-0.6.53, sys.version_info(major=3, minor=6, micro=8, releaselevel='final', serial=0), linux