-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Context
Some parts of the codebase still rely on direct console.* calls (console.warn, console.error, console.log, etc.) to report errors and runtime information.
Although this works during development, it may not be ideal for production.
Problem
Using console.* directly:
- Bypasses the project's logging abstraction
- May not be properly captured by production monitoring and log aggregation tools
- Leads to inconsistent log formats and missing contextual metadata
- Makes observability and debugging harder in production environments
Suggestion
Replace direct console.* calls with the project’s logger instance to ensure structured, consistent, and observable logs.
Example:
logger.warn(`Failed to get balances for vault ${vaultId}`, {
error: err?.message,
vaultId,
});
The same approach should be applied for other log levels such as error, info, or debug, depending on the context.
Metadata
Metadata
Assignees
Labels
No labels