Update the codebase to replace direct stack trace printing with structured log statements. Ensure consistency in logging levels (e.g., error, warning, debug) and improve error handling across the project. This will enhance maintainability, debugging, and observability.