A server-side Fabric mod for Minecraft 1.21.11+ that extends the Minecraft Server Management Protocol (MSMP) by forwarding every server console log event to all connected WebSocket clients as a JSON-RPC 2.0 notification.
- Minecraft 1.21.11+
- Fabric API 0.141.3+1.21.11+
- Download the mod
.jarand place it in your server'smods/folder. - Enable the Management Server in
server.properties:management-server-enabled=true - Start the server. The Management Server will listen on
localhost:25576by default.
Once a client connects to the WebSocket endpoint, it will receive a notification for every log event produced by the server.
Method: console:notification/log_event
| Field | Type | Description |
|---|---|---|
timestamp |
string | ISO-8601 timestamp of when the log event occurred |
level |
string | Log level: TRACE, DEBUG, INFO, WARN, ERROR or FATAL |
thread |
string | Name of the thread that produced the log event |
logger |
string | Fully qualified name of the originating logger (e.g. the class name) |
message |
string | The fully interpolated log message |
throwable |
string | Serialized stacktrace if an exception was attached, omitted otherwise |
{
"jsonrpc": "2.0",
"method": "console:notification/log_event",
"params": [{
"timestamp": "2026-03-21T15:06:06.146Z",
"level": "INFO",
"thread": "Server thread",
"logger": "net.minecraft.server.MinecraftServer",
"message": "Done (1.019s)! For help, type \"help\""
}]
}{
"jsonrpc": "2.0",
"method": "console:notification/log_event",
"params": [{
"timestamp": "2026-03-21T15:06:07.212Z",
"level": "ERROR",
"thread": "Server thread",
"logger": "net.minecraft.server.MinecraftServer",
"message": "Encountered an unexpected exception",
"throwable": "java.lang.NullPointerException: Cannot invoke ...\n\tat net.minecraft.server.MinecraftServer..."
}]
}- A custom Log4j2 appender is attached to the root logger on mod initialization, intercepting every log event produced by the server.
- On
SERVER_STARTED, the mod locates the internalManagementServerinstance via reflection. - For each log event, the appender builds a
ConsoleLogPayloadand broadcasts it to all active connections viaConnection#sendNotification. - The notification is registered under the custom namespace
console:notification/messageusing a Mixin accessor that bypasses the defaultminecraft:namespace restriction.