File tree Expand file tree Collapse file tree
java/net/javadiscord/javabot/data Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55/config.json
66/config
77/purgeArchives
8+ /logs
89
910# Eclipse settings
1011.classpath
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ public class SystemsConfig {
5959 public static class HikariConfig {
6060 private String jdbcUrl = "jdbc:h2:tcp://localhost:9122/./java_bot" ;
6161 private int maximumPoolSize = 5 ;
62+ private long leakDetectionThreshold = 10000 ;
6263 }
6364
6465 /**
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ private DbHelper() {
5454 var hikariConfigSource = config .getSystems ().getHikariConfig ();
5555 hikariConfig .setJdbcUrl (hikariConfigSource .getJdbcUrl ());
5656 hikariConfig .setMaximumPoolSize (hikariConfigSource .getMaximumPoolSize ());
57+ hikariConfig .setLeakDetectionThreshold (hikariConfigSource .getLeakDetectionThreshold ());
5758 var ds = new HikariDataSource (hikariConfig );
5859 // Add a shutdown hook to close down the datasource and server when the JVM terminates.
5960 Runtime .getRuntime ().addShutdownHook (new Thread (() -> {
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<configuration >
3+ <timestamp key =" timeOnLaunch" datePattern =" yyyy'.'MM'.'dd'-'HH'.'mm'.'ss" />
4+
35 <appender name =" STDOUT" class =" ch.qos.logback.core.ConsoleAppender" >
6+ <filter class =" ch.qos.logback.classic.filter.ThresholdFilter" >
7+ <level >INFO</level >
8+ </filter >
49 <encoder >
510 <pattern >%d{dd.MM.yyyy HH:mm:ss} %boldCyan(%-34.-34thread) %red(%10.10X{jda.shard}) %boldGreen(%-15.-15logger{0}) %highlight(%-6level) %msg%n</pattern >
611 </encoder >
712 </appender >
813
9- <root level =" info" >
14+ <appender name =" FILE" class =" ch.qos.logback.core.FileAppender" >
15+ <file >logs/log-${timeOnLaunch}.log</file >
16+ <filter class =" ch.qos.logback.classic.filter.ThresholdFilter" >
17+ <level >DEBUG</level >
18+ </filter >
19+ <immediateFlush >true</immediateFlush >
20+ <append >true</append >
21+ <encoder >
22+ <pattern >%d{dd.MM.yyyy HH:mm:ss} %-34.-34thread %10.10X{jda.shard} %-15.-15logger{0} %-6level %msg%n</pattern >
23+ </encoder >
24+ </appender >
25+
26+ <root level =" debug" >
1027 <appender-ref ref =" STDOUT" />
1128 </root >
29+
30+ <logger name =" com.zaxxer.hikari" >
31+ <appender-ref ref =" FILE" />
32+ </logger >
1233</configuration >
You can’t perform that action at this time.
0 commit comments