# Working with logs

Troubleshooting information and tips and tricks for Tray customers using the logs panel to debug their workflows

## Can I adjust the logs retention period?

### Answer

Yes! Depending on your account package, logs can be stored for either 7 or 30 days. We can reduce that down to 24 hours if needed for your use case. Just reach out to your Account Manager who will be happy to help.

## Logs tips and tricks

### Shift + Click

Got lost figuring out which log relates to which step? You can **'Shift + Click'** to quickly bring up the connector's properties panel from the debug log:
![shift clip static](https://tray.ai/documentation/images/help/troubleshooting/working-with-logs/5Rf7zoiIV9qCdtt7lDhbKP_shift_clip_static.png)

### Logs not updating

If you ever encounter a situation where your debug log is stuck or hasn't updated, you can refresh the page by switching between the 'Build' panel and the 'Debug' panel (It's much faster than reloading the whole webpage)
![switch-debug-build](https://tray.ai/documentation/images/help/troubleshooting/working-with-logs/5y4ML2ltUtx4rm5TzJAsxg_switch-debug-build.png)

### Replay Callable Workflows

If your workflow relies on other callable workflows then you **CAN** replay 'fire and forget' operations but **CAN'T** replay 'fire and response' ones, since they rely on a response (obviously...)

### Searching for specific steps

If you ever find yourself wondering what happened exactly at a certain step, you can filter through specific runs and instances of the workflow in the debug logs.
The simplest thing to do in most cases if your aim is to find a given step is to use the **Successful** search option, then select the step name you’re looking for. It’s important to remember to **click the magnifying glass icon** to commence the search!
![debug-searching](https://tray.ai/documentation/images/help/troubleshooting/working-with-logs/1zoKcgqZJDTyuacSdxfXOA_debug-searching.gif)
You can also search for a failed step within a failed run:
![search-specific-steps](https://tray.ai/documentation/images/help/troubleshooting/working-with-logs/4GY3IRPAWaxIhdxS69ZPf0_search-specific-steps.png)

### Searching logs with raw text

Need to find a specific record ID? Our search field allows you to search for raw text values:
![search-wth-raw-text](https://tray.ai/documentation/images/help/troubleshooting/working-with-logs/XInfyz5P6zoe4Q56Yfdcl_search-wth-raw-text.png)

### Viewing preceding and subsequent logs steps

Sometimes you want to know what happened in the steps which came soon before or after the step you're searching for.
You can click on the arrows on a step to find the immediately preceding or subsequent steps:
![view-preceding-and-subsequent-log-steps](https://tray.ai/documentation/images/help/troubleshooting/working-with-logs/7EUt9sTgkjLyvKEwjllozV_view-preceding-and-subsequent-log-steps.png)

### Searching through a large volume of logs

Is your workflow prolific? Feeling overwhelmed by logs? You can add before and after search conditions to make your results easier to find, and improve search retrieval speeds.
For example, the following 3 conditions would be combined to limit the number of logs searched where the input of step slack-1 had a field called "username" populated by "Tray.io"

* before > 2021-04-14T08:30:53.647Z
* after > 2021-04-15T08:30:53.647Z
* input > step:slack-1 > field:username > Tray.io
  For the long term, you should also consider refactoring your workflow to take advantage of [callables](https://youtu.be/Qq1eWhVld7s)

### Pausing logs

You can pause the steps (left) and data (right) panels. Very helpful when your workflow has lots of data flowing in. To start things flowing again, just hit "Resume":
![pausing-logs](https://tray.ai/documentation/images/help/troubleshooting/working-with-logs/4L8BiXN7heXjg9ksXe3IaT_pausing-logs.png)

###
