[607] Issue #103: Add Structured Logging with Log Levels to All Scripts - #784
Merged
Conversation
|
@Goodnessukaigwe Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Goodnessukaigwe
force-pushed
the
fix/607-issue-103-add-structured-logging-with-log-levels-to-all-scripts
branch
from
July 30, 2026 22:33
268395e to
2f22320
Compare
Introduce scripts/logger.ts (DEBUG/INFO/WARN/ERROR, LOG_LEVEL filtering, LOG_FORMAT=json, child loggers, circular-safe stringify) and replace console.* usage across PayFlow scripts so production log aggregation works. Co-authored-by: Cursor <cursoragent@cursor.com>
Goodnessukaigwe
force-pushed
the
fix/607-issue-103-add-structured-logging-with-log-levels-to-all-scripts
branch
from
July 30, 2026 22:43
2f22320 to
16bcd45
Compare
…ith-log-levels-to-all-scripts
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/logger.tswith DEBUG/INFO/WARN/ERROR levels,LOG_LEVELfiltering, human orLOG_FORMAT=jsonoutput, child loggers with inherited context, and circular-safeJSON.stringify.console.log/warn/erroracross all PayFlow scripts with the structured logger.scriptspackagetypecheckscript.Closes #607
Test plan
cd scripts && npm ci && npx tsc --noEmitLOG_FORMAT=json LOG_LEVEL=debug npx tsx -e 'import { logger } from "./logger.ts"; logger.debug("d"); logger.info("i", { a: 1 });'and pipe throughjqLOG_LEVEL=warnsuppresses debug/info linesMade with Cursor