made some preferences configurable
This commit is contained in:
@@ -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","*/*");
|
||||
|
||||
Reference in New Issue
Block a user