Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Research] Make logging configurable #2173

Closed
Uxio0 opened this issue Aug 6, 2024 · 2 comments
Closed

[Research] Make logging configurable #2173

Uxio0 opened this issue Aug 6, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Uxio0
Copy link
Member

Uxio0 commented Aug 6, 2024

Problem

When we need to see an issue in production, logging can only go from INFO or WARNING to DEBUG.

We need a way to increase the level for only a Service or Task

Solution

Investigate about possible solutions, document them on this issue and open a new issue to implement the solution

Initial ideas

@Uxio0 Uxio0 added the enhancement New feature or request label Aug 6, 2024
@moisses89
Copy link
Member

moisses89 commented Aug 9, 2024

Solution

Define logger by groups for example:

#ERC20_LOGGER
       "safe_transaction_service.history.indexers.erc20_events_indexer": {
            "level": env("ERC20_INDEXER_LEVEL", default="INFO")
        },
        "safe_transaction_service.history.tasks.index_erc20_events_task": {
            "level": env("ERC20_INDEXER_LEVEL", default="INFO")
        },

Where ERC20_INDEXER_LEVEL will define the log level for everything related with ERC20 indexer.

Groups proposed

  • ERC20_721_INDEXER_LOG_LEVEL
  • PROXY_FACTORY_INDEXER_LOG_LEVEL
  • SAFE_EVENTS_INDEXER_LOG_LEVEL
  • INTERNAL_TX_INDEXER_LOG_LEVEL
  • API_LOG_LEVEL (all the endpoints)
  • BALANCES_API_LOG_LEVEL
  • MESSAGES_API_LOG_LEVEL
  • ALL_TRANSACTIONS_API_LOG_LEVEL

@moisses89
Copy link
Member

Created an issue with the proposed solution. #2184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants