Implement a handler for logging routes

This commit is contained in:
KingRainbow44
2022-04-30 20:38:18 -04:00
Unverified
parent 8830da8bc1
commit 6fb0b5494f
2 changed files with 23 additions and 4 deletions
@@ -0,0 +1,19 @@
package emu.grasscutter.server.dispatch;
import express.http.HttpContextHandler;
import express.http.Request;
import express.http.Response;
import java.io.IOException;
/**
* Used for processing crash dumps & logs generated by the game.
* Logs are in JSON, and are sent to the server for logging.
*/
public final class ClientLogHandler implements HttpContextHandler {
@Override
public void handle(Request request, Response response) throws IOException {
// TODO: Figure out how to dump request body and log to file.
response.send("{\"code\":0}");
}
}