Start here

↑ ↓ to move, Enter to openKeyword search
Multiplayer

Developer logs

Rendered from the repository, where it is written as the work happens: it keeps its history, and a status line above says when it describes a design rather than something shipped.

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:

  1. 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.

  2. 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).

  3. Takes an optional note: "What happened, and roughly when?"

  4. Zips, then uploads, with a progress bar for each. Cancel and Escape are locked while it sends.

  5. 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":

FromFiles
The game's ue4ss folder, 5 folders deepevery *.log: UE4SS.log, MJOLNIRLobby/native/fireteam.log, MJOLNIRLevelLoader/native/map_registry.log, MJOLNIRHud/hitches*.log, bench.log, ...
The same folder, by nameMods/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\LogsMeteorite.log (near empty in Shipping)

What never goes:

  • anything else in ue4ss, including the Lobby's request, reply, connection and session .txt files, 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.log only 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) and utc_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_version and sent_local are cut to length rather than refused.
  • utc_offset_minutes is 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). 400 when the body is not a zip or its SHA-256 is not bundle_sha256.
  • Success: 200 {sha256, bytes}. A second upload of a stored report answers 200 without 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. before takes a created_at to page back.
  • GET /admin/log-reports/{id}/bundle: the zip, named logs-<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 dev connects it only with MJ_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

  1. Apply migration 0029 to production first. It only adds a table, and deploy-hub.yml does not run migrations, so the routes would fail until it is in. Run pnpm --dir hub db:migrate:prod.
  2. Set the ADMIN_NOTIFY_EMAILS repository secret. The next deploy uploads it.
  3. Merge; the hub deploys from main. It is the first deploy with the EMAIL binding, so watch it.
  4. Add the R2 lifecycle rule for logs/.
  5. 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.mts drives the real routes against every migration, with a stand-in R2 bucket and EMAIL binding.
  • Launcher unit tests: cargo test --lib devlogs in apps/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 --nocapture zips them and checks no user name or key is left. To send them to a local hub too:
    1. Run pnpm db:migrate.

    2. Seed a user and an API key into the local D1.

    3. Run pnpm dev.

    4. 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