made some preferences configurable

This commit is contained in:
2025-07-03 22:58:31 +02:00
parent e53beb9848
commit c96e7d73ba
4 changed files with 49 additions and 10 deletions

View File

@@ -21,6 +21,16 @@ public class Util {
public static final System.Logger LOG = System.getLogger("Util");
private Util(){}
public static System.Logger.Level mapLogLevel(String lbl) {
return switch (lbl){
case "ERROR" -> ERROR;
case "WARN" -> WARNING;
case "DEBUG" -> DEBUG;
case "TRACE" -> TRACE;
default -> INFO;
};
}
public static HttpURLConnection open(URL url) throws IOException {
var conn = (HttpURLConnection) url.openConnection();
conn.setRequestProperty("Accept","*/*");