mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Reduce the number of entries sent to the verbose viewer, cleanup old hikari try..catches
This commit is contained in:
parent
f93e8fdccd
commit
0d89840179
@ -88,17 +88,9 @@ public abstract class HikariConnectionFactory extends AbstractConnectionFactory
|
||||
// If a connection is not returned within 10 seconds, it's probably safe to assume it's been leaked.
|
||||
config.setLeakDetectionThreshold(TimeUnit.SECONDS.toMillis(10)); // 10000
|
||||
|
||||
// The drivers are really old in some of the older Spigot binaries, so Connection#isValid doesn't work.
|
||||
config.setConnectionTestQuery("/* LuckPerms ping */ SELECT 1");
|
||||
|
||||
try {
|
||||
// don't perform any initial connection validation - we subsequently call #getConnection
|
||||
// to setup the schema anyways
|
||||
config.setInitializationFailTimeout(-1);
|
||||
} catch (NoSuchMethodError e) {
|
||||
//noinspection deprecation
|
||||
config.setInitializationFailFast(false);
|
||||
}
|
||||
// don't perform any initial connection validation - we subsequently call #getConnection
|
||||
// to setup the schema anyways
|
||||
config.setInitializationFailTimeout(-1);
|
||||
|
||||
this.hikari = new HikariDataSource(config);
|
||||
}
|
||||
|
@ -127,7 +127,12 @@ public class CheckData {
|
||||
public JsonObject toJson(StackTracePrinter tracePrinter) {
|
||||
return formBaseJson()
|
||||
.add("trace", new JArray()
|
||||
.consume(arr -> tracePrinter.process(this.checkTrace, StackTracePrinter.elementToString(arr::add)))
|
||||
.consume(arr -> {
|
||||
int overflow = tracePrinter.process(this.checkTrace, StackTracePrinter.elementToString(arr::add));
|
||||
if (overflow != 0) {
|
||||
arr.add("... and " + overflow + " more");
|
||||
}
|
||||
})
|
||||
)
|
||||
.toJson();
|
||||
}
|
||||
|
@ -56,11 +56,11 @@ public class VerboseListener {
|
||||
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
|
||||
|
||||
// how much data should we store before stopping.
|
||||
private static final int DATA_TRUNCATION = 10000;
|
||||
private static final int DATA_TRUNCATION = 3000;
|
||||
// how many lines should we include in each stack trace send as a chat message
|
||||
private static final int STACK_TRUNCATION_CHAT = 15;
|
||||
// how many lines should we include in each stack trace in the web output
|
||||
private static final int STACK_TRUNCATION_WEB = 30;
|
||||
private static final int STACK_TRUNCATION_WEB = 20;
|
||||
|
||||
private static final StackTracePrinter FILTERING_PRINTER = StackTracePrinter.builder()
|
||||
.ignoreClassStartingWith("me.lucko.luckperms.")
|
||||
|
Loading…
Reference in New Issue
Block a user