All Products
Search
Document Center

Simple Log Service:FAQ

Last Updated:Oct 26, 2023

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

What do I do if the TLSV1_ALERT_PROTOCOL_VERSION error occurs when I install the Simple 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 Simple 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 file named aliyunlog and enter 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

The returned data is displayed in different formats. How do I format the data?

Simple Log Service CLI commands provide the global parameter --format-output to format the returned data. For example, if you specify --format-output=json, the data is returned in the JSON format. For more information, see Global parameters.