-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve log debuggability (#170)
# Description Improve logs to make them easier to debug issues. Logs were not great, and won't be great after this PR. The goal of this PR is to improve some aspects of the logs to make it easier to debug. It is very useful to be able to filter by block number, or by owner, or order number. Before this PR there was some context, but this context was missing in some parts, what made things like "filtering logs per block" to not work. Now all logs include the chain id and the block number. See example: <img width="1699" alt="Screenshot at Dec 05 22-17-10" src="https://github.com/user-attachments/assets/642e92e7-0577-42ca-bca1-721338dc5e82"> Additionally, it simplifies some logger names and function names, and improve some messages so they are easier to read. It also shows information about the number of owners and orders and how many left to process. The PR also makes the logger utility to receive this context raw params, so we can make the logger prefix constant. Before we used to concatenate the fields, and we were not systematic with the order. Anyways, as mentioned, logging is still not great specially in terms of code cleanness, but at least now the logs are a bit easier to debug.
- Loading branch information
Showing
13 changed files
with
307 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.