Log Collection

    This tutorial demonstrates how to collect logs for an example app.

    • You need to create a workspace, a project and a user (). The user must be invited to the project with the role of admin at the project level. For more information, see Create Workspaces, Projects, Users and Roles.
    • You need to enable .
    1. From the left navigation bar, click Log Collection in Project Settings, and then click to enable the feature.

    1. From the left navigation bar, select Workloads in Application Workloads. Under the Deployments tab, click Create.

    2. In the dialog that appears, set a name for the Deployment (for example, ) and click Next.

    3. Under Containers, click Add Container.

    4. Scroll down to Start Command and select the checkbox. Enter the following values for Command and Parameters respectively, click , and then click Next.

      Command

      Parameters

        Note

        The command and parameters above mean that the date information will be exported to app-test.log in /data/log every 30 seconds.

      1. On the Volume Settings tab, click Log Collection - 图2 to enable Collect Logs on Volumes and click Mount Volume.

      2. Click , and then click Next.

      3. Click Create in Advanced Settings to finish the process.

        Note

        For more information, see Deployments.

      1. Under the Deployments tab, click the Deployment just created to go to its detail page.

      2. In Resource Status, you can click to view container details, and then click Log Collection - 图4 of logsidecar-container (filebeat container) to view logs.