Skip to content

feat: improve logging and allow disabling request-logs#1069

Merged
perber merged 2 commits into
mainfrom
feat/improve-logging
May 29, 2026
Merged

feat: improve logging and allow disabling request-logs#1069
perber merged 2 commits into
mainfrom
feat/improve-logging

Conversation

@perber

@perber perber commented May 29, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 29, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves structured logging across LeafWiki and adds an option to suppress per-request HTTP access logs.

Changes:

  • Replaces Gin’s default logger setup with slog-backed request/recovery logging and a DisableRequestLog router option.
  • Adds CLI/env support for --disable-request-log / LEAFWIKI_DISABLE_REQUEST_LOG.
  • Adds structured logs for search indexing, shutdown, CSRF failures, startup, and reverse-proxy auth events.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/wiki/wiki.go Adds structured search lifecycle and close-error logging.
internal/http/router.go Adds slog-backed request logging and request-log disabling support.
internal/http/middleware/security/csrf.go Converts CSRF warnings from standard log to slog.
internal/http/middleware/auth/reverse_proxy.go Adds structured reverse-proxy authentication diagnostics.
cmd/leafwiki/main.go Wires the new request-log disable flag/env option and adds startup/config logs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/http/router.go
@perber
perber force-pushed the feat/improve-logging branch from 67e093a to e97bb04 Compare May 29, 2026 15:44
@perber
perber merged commit 82a5027 into main May 29, 2026
8 checks passed
@perber
perber deleted the feat/improve-logging branch May 29, 2026 15:57
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.

2 participants