fix(engine): always write the heartbeat line regardless of logging level

The launcher's wedge watchdog kills a client whose RynthCore.<pid>.log is silent
for 120 s. The hb line went through RynthLog.Info at the General category's level,
so LoggingLevel=Info with General=Trace filtered it and healthy in-world clients
were killed and relaunched every few minutes. RynthLog.Heartbeat writes
unconditionally, like RynthLog.Error.

Release 2026.10.5.14.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
BlankenshipG 2026-10-06 15:18:30 -04:00
commit b4675736ee
3 changed files with 56 additions and 1 deletions

View file

@ -162,7 +162,8 @@ internal static class HeartbeatLogger
// every use/move/equip meanwhile); atk=1 = its attacking flag is set. Both
// omitted while open, so a long run of req= in a log is the item-action lock.
string gateField = ClientActionGates.HeartbeatField();
RynthLog.Info($"hb #{tick} up={(nowMs - startMs) / 1000}s fps={fps} draw={draw} plug={pps}/s ws={wsMb}MB login={login} qdrop={dropped} rec={rec} fcl={fcl}{idleField}{uiField}{vaField}{gateField}");
// Unfiltered on purpose: it is the launcher's liveness signal (see RynthLog.Heartbeat).
RynthLog.Heartbeat($"hb #{tick} up={(nowMs - startMs) / 1000}s fps={fps} draw={draw} plug={pps}/s ws={wsMb}MB login={login} qdrop={dropped} rec={rec} fcl={fcl}{idleField}{uiField}{vaField}{gateField}");
// Every 60 s: garbage collections and the time they paused the process.
// Under the CoreCLR host the engine and managed plugins share one GC, so a

View file

@ -55,6 +55,15 @@ internal static class RynthLog
EntryPoint.LogTagged("engine", msg, "WRN");
}
/// <summary>
/// Always-on heartbeat line, written at every LoggingLevel (Off included). The launcher's
/// wedge watchdog reads RynthCore.&lt;pid&gt;.log going quiet for 120 s as a dead engine and
/// kills the client, so this line must never be filtered: on 2026-10-06 LoggingLevel=Info
/// with General=Trace dropped it and healthy in-world clients were killed and relaunched
/// every few minutes.
/// </summary>
internal static void Heartbeat(string msg) => EntryPoint.LogTagged("engine", msg, "INF");
/// <summary>Always-on ERROR line — a fault/crash/disable, written even at level Off. Triage with grep "[ERR]".</summary>
internal static void Error(string msg)
{