Updated on 2026-07-28 GMT+08:00

Obtaining Logs

To ensure normal system operation, improve troubleshooting efficiency, and locate and analyze problems in a timely manner, you can obtain and view the log information of CodeArts Agent by following the instructions provided in this section.

Log Level Description

Log levels increase in severity like this: Debug, Info, Warn, and Error.

  • Debug: Records detailed internal information during runtime, such as request details and process steps. This level is mainly used for debugging and fault locating in the development phase.
  • Info: Records key status information during normal runtime, such as service startup and request processing summaries, to help you understand the basic system workflow.
  • Warn: Records potential issues that may affect system stability, such as missing configurations and insufficient resources. These issues do not directly cause program interruption.
  • Error: Records errors that have caused some functions to be abnormal or operations to fail, such as API calling failures and data parsing errors. These errors require timely attention and rectification.

Setting the Log Level

Set the log level based on the actual scenario to control the output content and details of logs, thereby improving log readability and system debugging efficiency. You are advised to set the log level to Debug. Debug logs record internal code execution details during development and debugging, making it easier to locate and troubleshoot problems that occur during code execution.

  1. Log in to CodeArts Agent as instructed in Quick Start.
  2. Open the CodeArts Agent chat panel.

    • Visual Studio Code: Click in the Visual Studio Code sidebar to open the CodeArts Agent chat panel.
    • JetBrains (with IntelliJ IDEA as an example): Click in the IntelliJ IDEA sidebar to open the CodeArts Agent chat panel.

  3. On the chat page, click in the upper right corner to access the settings page.
  4. Visual Studio Code: In the Advanced Settings > Log Level drop-down list, select Debug.

    Figure 1 Setting the log level (Visual Studio Code)

  5. IntelliJ IDEA: In the Advanced > Minimum Log Level drop-down list, select Debug.

    Figure 2 Setting the log level (IntelliJ IDEA)

Obtaining CodeArts Agent Logs

The following describes how to obtain logs.

  1. Open Visual Studio Code and choose Help > Show All Commands from the top menu bar.

    Figure 3 Choosing Show All Commands

  2. Enter log to search for the command, and select Huawei Cloud CodeArts Agent: Open Current Log File. The log content is displayed in the editor.

    Figure 4 Selecting Huawei Cloud CodeArts Agent: Open Current Log File

  3. Right-click the log name at the top of the editor and choose Reveal in File Explorer from the shortcut menu. The folder where the log is stored is displayed.

    Figure 5 Choosing Reveal in File Explorer

  4. Obtain the agent process log of the corresponding date as required.
  5. Obtain kernel logs.

    View kernel logs in the local %USERPROFILE%/.codeartsdoer/vscode-data/log directory.

The following uses IntelliJ IDEA as an example to describe how to obtain CodeArts Agent logs.

  1. Open IntelliJ IDEA, click in the upper left corner, and choose Help > Show CodeArts Agent Log in Explorer. The folder where the logs are stored is displayed.

    Figure 6 Choosing Show CodeArts Agent Log in Explorer

  2. Obtain the agent log of the corresponding date as required.

    For the latest log, no date identifier is added to the end of the log name.

  3. Obtain kernel logs.

    View the kernel logs in the local %USERPROFILE%/mylogs directory.