Prefix plugin logs with LocalPlayerId

Add a per-instance local-player log prefix and apply it to networking and main plugin logs to make shared Fallout4Together.log entries readable when multiple instances run. Introduces F4T::Networking::GetLocalPlayerLogPrefix() (declared in F4TNetworking.h, implemented in F4TNetworking.cpp) and updates numerous REX::INFO/WARN calls to include the prefix. Also: only log sent player transforms after SendTransformPacket succeeds, add a small TODO comment about per-instance log files, and update docs (dev-log.md and plugin/setup.md) and the setup checklist to reflect the prefixed logging behavior. The prefix reads the assigned player ID via the thread-safe remote-player accessor and defaults to "[LocalPlayerId=unassigned]" before assignment.
This commit is contained in:
2026-05-31 20:55:32 +12:00
parent 320033f5b8
commit c35659bc30
5 changed files with 120 additions and 34 deletions
+28
View File
@@ -516,6 +516,34 @@ Player position: X=2048.00, Y=2048.00, Z=0.00, AngleZ=0.00
---
## 2026-05-31 - Per-Instance Client Log Prefixes
### What Changed
- Added a shared local-player log prefix helper for plugin networking logs.
- Prefixed important startup, connection, welcome, transform send, remote update, disconnect, and networking warning logs with `[LocalPlayerId=unassigned]` or `[LocalPlayerId=N]`.
- Kept the existing `Fallout4Together.log` file name and avoided per-instance log files for this milestone.
### What Worked
- The prefix reads the existing assigned player ID state through the thread-safe remote-player state accessor.
- Remote player state storage and packet relay behavior remain unchanged.
### What Broke
- Nothing recorded.
### Notes
- Actor spawning, actor movement, gameplay sync, and protocol changes remain out of scope.
- A future launcher/profile milestone can revisit separate per-instance log files.
### Next Steps
- Test two Fallout 4 instances through F4SE and confirm prefixed remote update/disconnect logs are readable in the shared log file.
---
## Entry Template
Use this format for future updates: