Players can send their game's MJOLNIR logs to the developers in one click. The
launcher zips them, masks Windows user names, and uploads them to the hub under
the player's account. The hub stores the zip, emails the admins, and lists it
on /moderation#logs. Built for #499 after the 2026-11-28 playtest, where the
evidence for every disconnect was in logs on other players' PCs, above all the
host's.
In the launcher
Send developer logs is in the account menu (the avatar, top right), so the player is signed in. The dialog:
-
Shows what will go before anything is read. It lists every file with its size, or "last N of M" for a long log that is cut.
-
Says plainly what the logs contain:
- what the mods wrote: joins, disconnects, matches, map loads, hitches;
- the player's Steam or Xbox ID and lobby IDs, and the names of the players they played with, as the logs record them;
- that the Windows user name is taken out of file paths.
It also says who can read them (hub admins only) and for how long (90 days).
-
Takes an optional note: "What happened, and roughly when?"
-
Zips, then uploads, with a progress bar for each. Cancel and Escape are locked while it sends.
-
Ends with a reference (the first 8 characters of the report id), for a player who was asked for their logs.
The work is in apps/launcher/src-tauri/src/devlogs.rs (commands
dev_logs_preview and dev_logs_send, progress on the dev-logs event). The
dialog is apps/launcher/src/components/DevLogsDialog.tsx.
What goes
An allow-list, never "everything in the folder":
| From | Files |
|---|---|
The game's ue4ss folder, 5 folders deep | every *.log: UE4SS.log, MJOLNIRLobby/native/fireteam.log, MJOLNIRLevelLoader/native/map_registry.log, MJOLNIRHud/hitches*.log, bench.log, ... |
| The same folder, by name | Mods/MJOLNIRLevelLoader/breadcrumbs.txt, Mods/MJOLNIRHud/last_match.txt, Mods/mods.txt |
The launcher's crash-reports\<id>\ | the UE4SS.log kept beside each past crash (the game overwrites UE4SS.log at every launch, so these are the only copies of older sessions) |
%LOCALAPPDATA%\Meteorite\Saved\Logs | Meteorite.log (near empty in Shipping) |
What never goes:
- anything else in
ue4ss, including the Lobby's request, reply, connection and session.txtfiles, which hold join strings; - the launcher's own config, which holds the hub key.
A scan of a dev PC's logs on 2026-11-29 found no hub keys, bearer tokens or join strings in any of them; only Windows user paths, which are masked.
Size limits:
- Per file: the last 48 MiB, cut at a line start.
fireteam.logonly grows: 17 MB after a few weeks on the dev PC, about 0.4 MB an evening, so 48 MiB reaches back well past a playtest a player is asked about days later. - In all: 256 MiB, the smallest files first, so a huge log is cut rather than a small one dropped.
- Typical send: the dev PC's 32 files, 37 MB, zip to 2.6 MB in under 2 seconds.
report.json in the zip carries:
- the launcher version and the installed hub and code mods;
- every file's size, the bytes sent, whether it was cut, and when it was last written (UTC);
- the player's clock:
sent_local(with the zone name) andutc_offset_minutes.
The clock matters because the mods' logs are local time with no date or zone.
To line a host's fireteam.log up with a joiner's, convert both with their
offsets.
Hub API
hub/src/lib/api/logs.ts. All under /api/v1 with the launcher's paired key.
Any valid key will do, as for crash reports. Each key has an hourly budget: 6
announcements and 12 uploads (admins have none).
POST /log-reports
{
"note": "Everyone dropped at about 5:54 PM in Hang 'Em High.",
"launcher_version": "0.26.0",
"file_count": 32,
"raw_bytes": 37006457,
"utc_offset_minutes": -360,
"sent_local": "2026-11-29 14:05:10 America/Chicago",
"bundle_bytes": 2578043,
"bundle_sha256": "<hex>"
}
note(2000 characters),launcher_versionandsent_localare cut to length rather than refused.utc_offset_minutesis east positive, -840 to 840.
Answers 201:
{ "id": "<report id>", "bundle_upload": { "method": "PUT", "url": "/log-reports/<id>/bundle", "max_bytes": 67108864 } }
PUT /log-reports/{id}/bundle
- Body: the zip,
Content-Type: application/zip, at most 64 MiB. - Refusals: only the report's owner may upload (anyone else gets
404).400when the body is not a zip or its SHA-256 is notbundle_sha256. - Success:
200 {sha256, bytes}. A second upload of a stored report answers200without storing or mailing again.
Reading them (admins)
GET /admin/log-reports?limit=&before=: newest first. Each report has the sender (name,username), their note, clock, file count, sizes and whether the zip arrived.beforetakes acreated_atto page back.GET /admin/log-reports/{id}/bundle: the zip, namedlogs-<username>-<date>-<id>.zip.
Admins only, not moderators. The page is the Logs tab of /moderation
(/moderation#logs).
Storage
A log_reports row per send (migration 0029), and the zip in R2 MODS_BUCKET
under logs/<id>/bundle.zip. Nothing serves that bucket directly.
Each new report sweeps up to 50 reports older than 90 days, rows and
objects. As for crashes, set an R2 lifecycle rule on the logs/ prefix
(about 100 days) as a backstop:
wrangler r2 bucket lifecycle add mjolnir-mods logs-expiry logs/ --expire-days 100
The admins' email
When: once a zip is stored, the hub mails the admins through the Worker's
send_email binding (EMAIL, Cloudflare Email Service; wrangler.jsonc).
The code is in hub/src/lib/api/notify.ts.
What the mail holds:
- the sender's hub name;
- the file count and sizes;
- their clock;
- their note, as plain text;
- a link to
/moderation#logs.
The mail is text only, so a note cannot become markup. Names are flattened to
one line, so they cannot add mail headers. notified_at records the send, so
a report is mailed once.
Recipients are the ADMIN_NOTIFY_EMAILS Worker secret, comma separated.
deploy-hub.yml uploads it from the repository secret of the same name.
Addresses are never written in the repository.
The sender is NOTIFY_FROM (hub@mjolnircore.com), on the domain sending
is set up for.
When no mail goes:
- without the binding (local
next devconnects it only withMJ_REMOTE_BINDINGS=1); - without recipients;
- when the send fails.
In each case the upload still succeeds. The Logs tab is the record either way.
Shipping
- Apply migration 0029 to production first. It only adds a table, and
deploy-hub.ymldoes not run migrations, so the routes would fail until it is in. Runpnpm --dir hub db:migrate:prod. - Set the
ADMIN_NOTIFY_EMAILSrepository secret. The next deploy uploads it. - Merge; the hub deploys from main. It is the first deploy with the
EMAILbinding, so watch it. - Add the R2 lifecycle rule for
logs/. - Release the launcher after an in-game test.
A launcher released before the hub has the route gets 404. The dialog then
says "This hub does not take developer logs yet."
Testing locally
- Hub routes:
pnpm --dir hub exec tsx scripts/test-log-reports.mtsdrives the real routes against every migration, with a stand-in R2 bucket andEMAILbinding. - Launcher unit tests:
cargo test --lib devlogsinapps/launcher/src-tauri. They cover the allow-list, tails, masking,report.json, and the requests against a stand-in hub. - This PC's real logs:
cargo test --lib real_logs -- --ignored --nocapturezips them and checks no user name or key is left. To send them to a local hub too:-
Run
pnpm db:migrate. -
Seed a user and an API key into the local D1.
-
Run
pnpm dev. -
Rerun the test with these two variables set:
MJOLNIR_LOGS_HUB=http://localhost:3000/api/v1 MJOLNIR_LOGS_KEY=mjc_... cargo test --lib real_logs -- --ignored --nocapture
-