mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 23:34:10 +02:00
2.8 KiB
2.8 KiB
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
Statsconfig 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.examplegained theServerLogsandStatssections (the former had been missing), alongsideappsettings.json/appsettings.example.json.
Notes for server operators
- New config section:
Stats—Enabled(default true),IntervalHours(default 6),RetentionDays(default 90,0keeps reports forever). Seeappsettings.example.jsonand.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(orServerLogs:MinLevelfor the room) toDebug, or read the periodic stats report for aggregates.