What problem does it solve?
It helps you diagnose failing endpoints and understand behavior during a request without manually hunting through scattered console output or guessing what happened inside the server.
Core Features & Use Cases
- Session-based logging with
session.log(): Write logs tied to the current request session and have them flush when the session closes.
- Configurable destinations and persistence: Store logs in database tables and/or print to console using text or JSON formats, based on your configuration.
- Retention and cleanup controls: Prevent log tables from growing without bound by setting time-based and count-based retention.
Use case: When an endpoint throws an exception, the Skill supports logging it as session failures (e.g., for auditing why a call failed or to find the slow stage), then reviewing the results in Serverpod’s logging UI.
Quick Start
Use the serverpod-logging skill to add session.log() calls inside your endpoints, then configure sessionLogs to enable the database and/or console output you want.