mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-12 06:48:50 +02:00
More debug logs for different connections (b2)
This commit is contained in:
parent
2cd3851979
commit
cdc4f36f2e
@ -12,6 +12,7 @@ import com.djrapitops.plan.system.info.request.InfoRequest;
|
||||
import com.djrapitops.plan.system.info.request.SetupRequest;
|
||||
import com.djrapitops.plan.system.info.server.ServerInfo;
|
||||
import com.djrapitops.plan.utilities.html.HtmlStructure;
|
||||
import com.djrapitops.plugin.api.utility.log.Log;
|
||||
|
||||
/**
|
||||
* InfoSystem for Bukkit servers.
|
||||
@ -29,6 +30,7 @@ public class BukkitInfoSystem extends InfoSystem {
|
||||
if (infoRequest instanceof SetupRequest) {
|
||||
throw new NoServersException("Set-up requests can not be run locally.");
|
||||
}
|
||||
Log.debug("LocalRun: " + infoRequest.getClass().getSimpleName());
|
||||
infoRequest.runLocally();
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ package com.djrapitops.plan.system.info.connection;
|
||||
import com.djrapitops.plan.system.info.request.InfoRequest;
|
||||
import com.djrapitops.plan.system.info.server.Server;
|
||||
import com.djrapitops.plan.utilities.MiscUtils;
|
||||
import com.djrapitops.plugin.api.utility.log.Log;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -34,11 +35,15 @@ public class ConnectionLog {
|
||||
}
|
||||
|
||||
public static void logConnectionTo(Server server, InfoRequest request, int responseCode) {
|
||||
logConnection(server.getWebAddress(), "Out: " + request.getClass().getSimpleName(), responseCode);
|
||||
String requestName = request.getClass().getSimpleName();
|
||||
String address = server.getWebAddress();
|
||||
logConnection(address, "Out: " + requestName, responseCode);
|
||||
Log.debug("ConnectionOut: " + requestName + " to " + address);
|
||||
}
|
||||
|
||||
public static void logConnectionFrom(String server, String requestTarget, int responseCode) {
|
||||
logConnection(server, "In: " + requestTarget, responseCode);
|
||||
Log.debug("ConnectionIn: " + requestTarget + " from " + server);
|
||||
}
|
||||
|
||||
private static void logConnection(String address, String infoRequestName, int responseCode) {
|
||||
|
@ -113,7 +113,6 @@ public class ConnectionOut {
|
||||
byte[] toSend = parameters.getBytes();
|
||||
|
||||
connection.setUseCaches(false);
|
||||
Log.debug("ConnectionOut: " + infoRequest.getClass().getSimpleName() + " to " + address);
|
||||
try (DataOutputStream out = new DataOutputStream(connection.getOutputStream())) {
|
||||
out.write(toSend);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
name: Plan
|
||||
author: Rsl1122
|
||||
main: com.djrapitops.plan.PlanBungee
|
||||
version: 4.1.6-b1
|
||||
version: 4.1.6-b2
|
@ -1,7 +1,7 @@
|
||||
name: Plan
|
||||
author: Rsl1122
|
||||
main: com.djrapitops.plan.Plan
|
||||
version: 4.1.6-b1
|
||||
version: 4.1.6-b2
|
||||
softdepend:
|
||||
- EssentialsX
|
||||
- Towny
|
||||
|
Loading…
Reference in New Issue
Block a user