Skip to content

[Feature]: add structured application logger - #112

Merged
viiccwen merged 1 commit into
mainfrom
feat/structured-application-logger
Jul 13, 2026
Merged

[Feature]: add structured application logger#112
viiccwen merged 1 commit into
mainfrom
feat/structured-application-logger

Conversation

@viiccwen

Copy link
Copy Markdown
Contributor

Summary

Add a shared JSON Lines application logger with consistent event fields and default redaction or hashing for sensitive values. Migrate the notification service as the initial structured-logging slice while preserving stderr and Docker log compatibility.

Related Issue

Fixes #90

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Configuration or deployment
  • Tests

Changes

  • Add a thread-safe structured logger using the project's Taipei timezone and stderr by default.
  • Add hashing and redaction policies for account IDs, emails, tokens, exceptions, and user-provided content.
  • Migrate Discord notification delivery logs and cover formatting, privacy, failure paths, timezone handling, and JSON edge cases.

Testing

  • Local tests or checks pass: make test (257 passed)
  • Manual verification completed: make precommit and git diff --check
  • Not tested; reason:

Impact Checklist

  • Discord bot behavior checked, if affected
  • MCP server behavior checked, if affected
  • Webhook behavior checked, if affected
  • Docker or compose changes checked, if affected
  • Environment variables documented, if changed
  • Logs do not expose secrets or sensitive data

Notes for Reviewers

Issue #90 intentionally requests a small initial migration slice. This PR migrates the complete notifications module; remaining application logs can move incrementally under the broader observability work in #89.

Signed-off-by: viiccwen <vicwen@apache.org>
@viiccwen
viiccwen marked this pull request as ready for review July 13, 2026 07:17
@viiccwen
viiccwen merged commit ce6d8b7 into main Jul 13, 2026
2 checks passed
@viiccwen
viiccwen deleted the feat/structured-application-logger branch July 13, 2026 07:17
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.

[Observability]: Add structured application logger

1 participant