Skip to content

refactor(auth): route challenge debug logs through structured logger - #141

Open
ZacLou wants to merge 1 commit into
ourdao:mainfrom
ZacLou:issue-133-structured-logger
Open

refactor(auth): route challenge debug logs through structured logger#141
ZacLou wants to merge 1 commit into
ourdao:mainfrom
ZacLou:issue-133-structured-logger

Conversation

@ZacLou

@ZacLou ZacLou commented Aug 31, 2026

Copy link
Copy Markdown

Closes #133

Replaces the two console.debug calls in src/auth.ts with a structured logger so the /auth/challenge path no longer leaks member addresses to stdout unconditionally.

Changes:

  • Adds src/lib/logger.ts: a minimal structured logger that respects LOG_LEVEL and outputs single JSON lines.
  • Adds formatAddress() to truncate Stellar addresses for logs (e.g. GABC...WXYZ).
  • Updates src/auth.ts to log through logger.debug(...) with a truncated address instead of console.debug(...).

The debug messages are now suppressed when LOG_LEVEL is set to info or higher, and addresses are no longer fully exposed in logs.

@ZacLou
ZacLou force-pushed the issue-133-structured-logger branch from f11c3ed to 9f2f03f Compare August 31, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Member addresses are debug-logged on every challenge request

1 participant