[PR #224] [MERGED] refactor: logging system and remove client-side debug mode #4515

Closed
opened 2026-10-22 04:08:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/224
Author: @coxde
Created: 4/25/2026
Status: ✅ Merged
Merged: 4/25/2026
Merged by: @coxde

Base: main ← Head: refactor/logging


📝 Commits (9)

  • bbd192e refactor(client): remove client-side debug mode
  • ea55663 feat(server): add LOG_LEVEL=debug prompt and response logging
  • 92f259d docs: fix LOG_LEVEL default and update descriptions
  • ea22ac4 refactor(server): add shared Pino logger module
  • f4ce4e7 refactor(server): migrate all console.* calls to shared Pino logger
  • 33262e4 docs: add logging level reference and coding practices
  • c5b4fd4 feat(server): log thinking tokens at debug level
  • 63719e2 fix(logging): Pass error objects as first arg to logger
  • cf837c7 fix(server): Use Pino format specifiers in logger calls

📊 Changes

47 files changed (+891 additions, -1007 deletions)

View changed files

📝 .env.example (+2 -2)
📝 CLAUDE.md (+12 -0)
📝 CONTRIBUTING.md (+50 -0)
📝 docker-compose.yml (+1 -1)
📝 docs/CONFIGURATION.md (+48 -16)
📝 docs/FRONTEND.md (+232 -233)
➖ packages/client/src/components/agents/AgentDebugPanel.tsx (+0 -193)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+0 -8)
📝 packages/client/src/hooks/use-generate.ts (+1 -118)
📝 packages/client/src/stores/agent.store.ts (+0 -23)
📝 packages/client/src/stores/ui.store.ts (+6 -6)
📝 packages/server/src/app.ts (+5 -3)
📝 packages/server/src/config/runtime-config.ts (+4 -1)
📝 packages/server/src/db/connection.ts (+3 -2)
📝 packages/server/src/db/seed-backgrounds.ts (+3 -2)
📝 packages/server/src/db/seed-connection.ts (+3 -2)
📝 packages/server/src/db/seed-game-assets.ts (+3 -2)
📝 packages/server/src/db/seed-mari.ts (+3 -2)
📝 packages/server/src/db/seed.ts (+2 -1)
📝 packages/server/src/index.ts (+2 -1)

...and 27 more files

📄 Description

This pull request focuses on improving logging practices and documentation across the project. The most significant changes include the introduction of a dedicated logger module, detailed logging guidelines for server-side code, updates to environment variable documentation to clarify logging configuration, and formatting fixes in frontend documentation tables.

Close #220
Related to #187

Summary by CodeRabbit

  • Configuration

    • Default example env no longer forces info; enable verbose server logs via LOG_LEVEL=debug.
  • Chores

    • Server logging consolidated behind a structured Pino logger; logs now respect configured levels.
    • Debug-related fields removed from request payloads (no client-side debug flag sent).
  • Refactor

    • In-app debug UI and settings toggle removed; client no longer emits debug SSE payloads.
  • Documentation

    • New logging guidelines and updated configuration/docs describing levels and recommendations.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/224 **Author:** [@coxde](https://github.com/coxde) **Created:** 4/25/2026 **Status:** ✅ Merged **Merged:** 4/25/2026 **Merged by:** [@coxde](https://github.com/coxde) **Base:** `main` ← **Head:** `refactor/logging` --- ### 📝 Commits (9) - [`bbd192e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bbd192e7f20581903696edc3d6176b66e948f210) refactor(client): remove client-side debug mode - [`ea55663`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ea55663b50ba47e59120ce093a3dd2b3bbc3f0cf) feat(server): add LOG_LEVEL=debug prompt and response logging - [`92f259d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/92f259dcac4e927a27eb9fc2fe8a2d7ebd44e083) docs: fix LOG_LEVEL default and update descriptions - [`ea22ac4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ea22ac479a0b9e6ba662ff58db3d72409e259cb6) refactor(server): add shared Pino logger module - [`f4ce4e7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f4ce4e799249affd5b8cae9282c18422fd81949a) refactor(server): migrate all console.* calls to shared Pino logger - [`33262e4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/33262e4af2395ab5d47fc5e7cbebeaeced6f595d) docs: add logging level reference and coding practices - [`c5b4fd4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c5b4fd4f1d91658785268aff203838527a3af9ed) feat(server): log thinking tokens at debug level - [`63719e2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/63719e2e94c1b6c46905a0fc6e222e91d6548b77) fix(logging): Pass error objects as first arg to logger - [`cf837c7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cf837c7caec6f4dd31bd51da91f3049dbc01aad8) fix(server): Use Pino format specifiers in logger calls ### 📊 Changes **47 files changed** (+891 additions, -1007 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+2 -2) 📝 `CLAUDE.md` (+12 -0) 📝 `CONTRIBUTING.md` (+50 -0) 📝 `docker-compose.yml` (+1 -1) 📝 `docs/CONFIGURATION.md` (+48 -16) 📝 `docs/FRONTEND.md` (+232 -233) ➖ `packages/client/src/components/agents/AgentDebugPanel.tsx` (+0 -193) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+0 -8) 📝 `packages/client/src/hooks/use-generate.ts` (+1 -118) 📝 `packages/client/src/stores/agent.store.ts` (+0 -23) 📝 `packages/client/src/stores/ui.store.ts` (+6 -6) 📝 `packages/server/src/app.ts` (+5 -3) 📝 `packages/server/src/config/runtime-config.ts` (+4 -1) 📝 `packages/server/src/db/connection.ts` (+3 -2) 📝 `packages/server/src/db/seed-backgrounds.ts` (+3 -2) 📝 `packages/server/src/db/seed-connection.ts` (+3 -2) 📝 `packages/server/src/db/seed-game-assets.ts` (+3 -2) 📝 `packages/server/src/db/seed-mari.ts` (+3 -2) 📝 `packages/server/src/db/seed.ts` (+2 -1) 📝 `packages/server/src/index.ts` (+2 -1) _...and 27 more files_ </details> ### 📄 Description This pull request focuses on improving logging practices and documentation across the project. The most significant changes include the introduction of a dedicated logger module, detailed logging guidelines for server-side code, updates to environment variable documentation to clarify logging configuration, and formatting fixes in frontend documentation tables. Close #220 Related to #187 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Configuration** * Default example env no longer forces info; enable verbose server logs via LOG_LEVEL=debug. * **Chores** * Server logging consolidated behind a structured Pino logger; logs now respect configured levels. * Debug-related fields removed from request payloads (no client-side debug flag sent). * **Refactor** * In-app debug UI and settings toggle removed; client no longer emits debug SSE payloads. * **Documentation** * New logging guidelines and updated configuration/docs describing levels and recommendations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:08:19 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4515
No description provided.