The most ancient but the most effective way of understanding the system is to check the logs to see if they contain something that we print in case of a problem. Structured logging is particularly helpful if you want to troubleshoot even faster. However, it is not straightforward to check for the logs on CloudWatch. Plus, you can only check the logs of a function at a once. Thundra's
Logs Page aims to solve this problem by giving the flexibility of searching the logs for all of your serverless stacks.
Logs Page can be accessed using Thundra console’s navigation bar which lies on the left of the console. You navigate to the page by clicking on the Logs icon present on the navigation bar.
In this page, all the logs flowing all of your functions are listed and you can filter them according to the following information:
- Log Level: Some logs can be more critical or more mediocre compared to others. For example;
console.log()represents different level of severity. You can also give your own log level with Thundra loggers. You can filter the logs according to their log level.
- Log Message: You can make a wild card search in the logs using wild cards or exact words. For example; you can type
*undr*and this filter can bring you the logs which contain
- Log Context: You can use the standard output or any logger of Thundra or custom logger. You can filter the logs according to their source with this field.
In the following screenshot, you can see a basic view of Logs Page:
After you filter the logs that you're looking for, you're a step closer to understand what's happening in your system while these logs are printed. In order to see the trace chart of the invocation in which the logs are printed, you can click on
Go to Invocation button that will take you the
Invocation Detail page for this specific invocation.
From there, you can also go to the
Trace to see the complete flow of invocations happening between several Lambda functions and other resources.