Commit 2e1fc05
committed
feat: integrate pino for structured logging and add logger utility
- Added pino and pino-pretty to package.json for logging.
- Created a logger utility in src/utils/logger.ts to handle logging configurations for production and development environments.
- Replaced console.log and console.error statements with logger methods in various service files (leetcode-cn-service.ts, leetcode-global-service.ts).
- Updated tests to use logger for logging messages instead of console.log.
- Improved error handling in services by removing try-catch blocks where appropriate and using promises directly.1 parent 9ea4dc4 commit 2e1fc05
File tree
8 files changed
+717
-687
lines changed- src
- leetcode
- utils
- tests/services
8 files changed
+717
-687
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
0 commit comments