All Products
Search
Document Center

:View file logs

Last Updated:Sep 03, 2024

If you enable the file log collection feature when you create or upgrade an application, Serverless App Engine (SAE) collects business file logs and delivers the logs to Log Service or Message Queue for Apache Kafka. You can view, aggregate, and analyze unlimited lines of logs.

Prerequisites

You can configure log collection based on your business requirements. For more information, see the following topics:

Procedure

  1. Log on to the SAE console.

  2. In the left-side navigation pane, click Applications. In the top navigation bar, select a region. Then, click the name of an application.

  3. In the left-side navigation pane, choose Log Management > Persistent Logs.

  4. On the Persistent Logs page, click the Log Collection to Log Service tab or the Log Collection to Kafka tab, find the log that you want to view, and then click View File Log in the Actions column.

References

After you view file logs, you can perform related operations on specific logs based on your business requirements. For more information, see the following topics:

For information about how to export logs and analyze logs in a visualized manner, see Log search overview.

FAQ

  • Does the logging feature of SAE support log rotation?

    Yes, the logging feature of SAE supports log rotation. You can rotate logs by adding wildcard characters to the log file name.

    You can use only the asterisk (*) and question mark (?) wildcard characters when you specify a log file.

  • What do I do if no data is displayed in the Log Service console when I query file logs?

    By default, Log Service queries the data of the previous 15 minutes. If no data is displayed in the Log Service console, we recommend that you use a webshell to check whether logs are generated for your application. For more information, see Use the webshell feature to check the health status of applications.

    • If logs are generated for your application, join the DingTalk group 32874633 for technical support.

    • If no logs are generated, check your application.

  • Can I view the logs of the server if the log collection feature is disabled?

    Yes, you can view the logs. You can use one of the following methods to view the logs of the server:

    • Use a webshell to log on to an instance to view logs.

    • Use the built-in upload and download feature of a webshell, or use the Object Storage Service (OSS) command-line tool to upload file logs from the container to the cloud. Then, download the file logs to your on-premise server. For more information, see Use the webshell feature to upload and download files and Upload logs.