Skip to content

Commit

Permalink
Added Agent Log Level Configuration section (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
sangithravichandran authored Jul 2, 2024
1 parent b0f8e81 commit 492499b
Showing 1 changed file with 48 additions and 33 deletions.
81 changes: 48 additions & 33 deletions src/pages/docs/agent/troubleshooting/logs.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,71 @@
---
title: "Agent Logs"
metadesc: "How to fetach the logs files from the Testsigma Agent to troubleshoot the errors. These files help you resolve execution issues quickly in Testsigma App."
page_title: "Agent Logs: Configuration, Sending, and Debugging Guide"
metadesc: "Learn to configure agent log levels, send logs automatically or manually, and debug errors efficiently to resolve execution issues quickly."
noindex: false
order: 11.92
page_id: "Fetching Agent logs"
page_id: "testsigma-agent-logs"
search_keyword: ""
warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Agent Log Level Configuration"
url: "#agent-log-level-configuration"
- type: link
name: "Send the Logs Automatically"
url: "#send-the-logs-automatically"
- type: link
name: "Send the Logs manually"
name: "Send the Logs Manually"
url: "#send-the-logs-manually"
- type: link
name: "Debugging Agent Log Errors"
url: "#debugging-agent-log-errors"

---

---

To execute Testsigma tests on your local machines, a small utility program named Testsigma agent needs to be on each local machine. In this article, we will discuss how to send the log files of the Testsigma agent. Providing these files to the Testsigma Support Team will help us resolve execution issues quickly.

Testsigma Agent is a critical utility program that must be installed on each local machine to execute Testsigma tests. Proper log management is essential for debugging and maintaining the health of these automation agents. This guide covers everything from configuring log levels to automatically or manually sending log files to the Testsigma Support Team. This document explains how to configure agent log levels, send logs automatically and manually, and debug errors.

---

## **Send the Logs Automatically**
## **Agent Log Level Configuration**

1. From the dashboard, go to **Agents**.
Agent log-level configuration in Testsigma is important for debugging and keeping your automation agents healthy. By default, the INFO level is selected. This setting shows in the command line interface (CLI) and is written to the agent log files on your local device. When you report an agent issue, these logs are automatically sent to the Testsigma support team.

2. Hover over the agent of which you want to send logs, and click **Report Agent**.
### **Change Agent Level Configuration**

3. In the warning dialog, provide a description of the problem you're facing with the agent and click **Report**.
1. Click on the **Agents** icon in the left navigation bar. Open an agent from the Agent list page.
2. Click on the **Agent Settings** icon in the right navigation bar. Choose the agent log level configuration for CLI and local files from the log level options. ![Choose Agent Log Level](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/go_to_agent_log_b.gif)
- **ERROR**: Logs only critical issues that cause the agent to fail. Only error messages will appear in the CLI and be saved in the local agent log files.
- **WARN**: Logs warnings and errors to spot potential issues early. Warning and error messages will appear in the CLI and be saved in the local agent log files.
- **INFO**: The default level that logs general information, warnings, and errors for regular monitoring. Info, warning, and error messages will appear in the CLI and be saved in the local agent log files.
- **DEBUG**: Logs detailed information for debugging. Debug info, warnings, and errors will appear in the CLI and be saved in the local agent log files.
- **TRACE**: Logs detailed traces of the execution flow for deep debugging. Trace messages, debug info, warnings, and errors will appear in the CLI and be saved in the local agent log files.
- **ALL**: Logs all messages, providing the most detailed logging. All messages (error, warning, info, debug, and trace) will appear in the CLI and be saved in the local agent log files. ![agent log level configuration](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/agent_log_level_configuration.png)
3. After selecting the log-level configuration, **restart** the agent for the changes to take effect. ![choose log level and retsart agent](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/select_loglevel_restart.gif)

4. The logs will be reported to Testsigma support automatically.
[[info | NOTE:]]
| Always restart the agent after changing the log-level configuration to apply the new settings.

---

Here’s a quick GIF demonstrating how to send the logs automatically.
## **Send the Logs Automatically**

![Send Logs Automatically](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/agentlogsauto.gif)
1. From the dashboard, go to **Agents**.
2. Hover over the agent for which you want to send logs, and click **Report Agent**.
3. In the warning dialog, provide a description of the problem you're facing with the agent and click **Report**.
4. The logs will be reported to Testsigma support automatically.

Here’s a quick GIF demonstrating how to send the logs automatically. ![send logs automatically](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/agentlogsauto.gif)

---

## **Send the Logs manually**

You can find the Testsigma agent logs folder for your machine as mentioned below:
## **Send the Logs Manually**

**Location of Testsigma Agent Configuration/Logs**

The Testsigma Configuration/Log files are located at the following locations depending on the Operating System used:
You can find the Testsigma agent logs folder for your machine at the following locations, depending on the operating system used:

| Operating System | Location of Agent directory |
| :--- | :--- |
Expand All @@ -58,35 +74,34 @@ The Testsigma Configuration/Log files are located at the following locations dep
| Mac | $HOME/Library/Application Support/Testsigma/Agent/ |

- The **%userprofile%** points to the **C:\Users\< username > folder where < username >** is replaced by your Windows login username.
- $HOME in Linux/Mac also points to the user's home folder
- **$HOME** in Linux/Mac also points to the user's home folder

There would be a logs folder in the above directory. Inside the **logs** directory, you can find a number of files such as agent.log, Testengine.log e.t.c.
Inside the above directory, you will find a **logs** folder containing several files such as agent.log, Testengine.log, etc.

1. Please zip the **Agent** folder mentioned above.
1. Zip the **Agent** folder mentioned above.

2. Once you have the agent logs ZIP file, hover the agent of which you want to send logs and click **Report Agent**.
2. Hover over the agent for which you want to send logs and click **Report Agent**.

3. Click **Upload manually**. This will open a warning dialog.

4. In the warning dialog, provide a description of the problem you're facing with the agent, attach agent logs ZIP file click **Report**.

Here’s a quick GIF demonstrating how to send the logs manually.

![Agent Logs Manually](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/agentlogsmanual.gif)
![agent logs manually](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/agentlogsmanual.gif)

---

**Debugging Errors**

For a technical user, the logs will serve as a great tool for debugging the issues themselves. However, if you need an extra hand, we are always there for you. Just drop in a mail to **[email protected]** describing the issue and with the above-mentioned log files attached. Remember, adding as much detail as possible will help us resolve the issue in the shortest time.
## **Debugging Agent Log Errors**

For technical users, the logs serve as a valuable tool for debugging issues. If you need extra assistance, contact **[email protected]**, providing a description of the issue along with the log files mentioned above. Including as much detail as possible will help resolve the issue quickly.

Please include the following details in your email:

- **Project Name**
- **Application Name**
- **Test Case Name**
- **Execution Name**
- **Execution Type**: Hybrid Web/Hybrid Mobile (if Hybrid Mobile Execution, attach Appium Logs, which can be downloaded from the Appium Server. Contact Support for more details).

Please mention the following details in the mail:

* **Project Name**, **Application Name**, **Test Case Name**, and **Execution Name**.
* **Execution Type**: Hybrid Web/ Hybrid Mobile. If it is Hybrid Mobile Execution, attaching the Appium Logs too will help. You can download the Appium logs from the Appium Server. Contact Support for more details.


---
---

0 comments on commit 492499b

Please sign in to comment.