diff --git a/docs/changelog/index.md b/docs/changelog/index.md index 6dd17ed..492b6df 100644 --- a/docs/changelog/index.md +++ b/docs/changelog/index.md @@ -4,6 +4,7 @@ Release history for EchoHub. ## Releases +- [v0.2.16](v0.2.16.md) - Periodic Server-Stats Report, Upload & Moderation Logging & Quieter Connection Logs - [v0.2.15](v0.2.15.md) - Invite Codes, Data Export & Deletion, /me, /banner, Replies, Open Images In Browser & IRC Image Links - [v0.2.14](v0.2.14.md) - Clipboard Image & Multi-File Paste, E2E Room Unlock Fixes, Encrypted Key Cache & IRC Gateway Polish - [v0.2.13](v0.2.13.md) - Chat Visual Overhaul, Auto-Join All Channels & Persistent Read Positions diff --git a/docs/changelog/toc.yml b/docs/changelog/toc.yml index c8e2256..bab665b 100644 --- a/docs/changelog/toc.yml +++ b/docs/changelog/toc.yml @@ -1,5 +1,7 @@ - name: Overview href: index.md +- name: v0.2.16 + href: v0.2.16.md - name: v0.2.15 href: v0.2.15.md - name: v0.2.14 diff --git a/docs/changelog/v0.2.16.md b/docs/changelog/v0.2.16.md new file mode 100644 index 0000000..5f8aa08 --- /dev/null +++ b/docs/changelog/v0.2.16.md @@ -0,0 +1,43 @@ +# v0.2.16 + +A logging and observability pass built on the new server-logs room. Busy servers stop drowning +in connect/disconnect noise, the events operators actually care about — uploads, moderation +actions — now get logged, and a new periodic report summarizes server activity as pretty-printed +JSON that streams into the logs room and is saved to the database for history. + +## New Features + +- **Periodic server-stats report** — every 6 hours (configurable), the server logs an aggregate + activity snapshot as pretty-printed JSON and saves it to the database. Each report covers the + window since the previous one: messages sent, files uploaded (and total bytes), new members, + active members (distinct senders), session connections/disconnections, kicks, bans, total + registered members, users online now, and peak concurrent online. Reports also stream into the + live server-logs room, and old ones are pruned past a configurable retention. New `Stats` config + section (`Stats:Enabled`, `Stats:IntervalHours` = 6, `Stats:RetentionDays` = 90). +- **Upload logging** — every file, image, and audio upload is now logged with its resource URL + (`/api/files/{id}`), kind, size, uploader, and channel. In end-to-end encrypted rooms the + filename is client-side ciphertext, so it's logged as `[encrypted]` — the server still never + sees room content. +- **Moderation & user-action logging** — role changes, kicks, bans, unbans, mutes, unmutes, + moderator message removals, and channel nukes are now logged with the actor, target, and reason. + Bans and channel nukes log at Warning level so they stand out. + +## Improvements + +- **Quieter connection logs** — user connect, disconnect, join-channel, and leave-channel events + (over both SignalR and IRC) dropped from Information to Debug. On a busy server these fired + constantly and buried everything else; the aggregate counts now live in the periodic stats + report instead. They still show in Development, where the default level is Debug. +- **Config examples stay in sync** — `.env.example` gained the `ServerLogs` and `Stats` sections + (the former had been missing), alongside `appsettings.json` / `appsettings.example.json`. + +## Notes for server operators + +- New config section: `Stats` — `Enabled` (default true), `IntervalHours` (default 6), + `RetentionDays` (default 90, `0` keeps reports forever). See `appsettings.example.json` and + `.env.example`. A non-positive interval falls back to 6h; positive values are honored down to a + 1-second floor. +- One new database migration (`AddServerStatsReports`) applies automatically on startup. +- Connect/disconnect/join/leave now log at Debug — if you relied on those Information lines, lower + `Serilog:MinimumLevel:Default` (or `ServerLogs:MinLevel` for the room) to `Debug`, or read the + periodic stats report for aggregates. diff --git a/src/Directory.Build.props b/src/Directory.Build.props index a322e10..9778188 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,6 @@ - 0.2.15 + 0.2.16 true $(NoWarn);CS1591