2022-09-04 21:21:24 +02:00
|
|
|
package io.gitlab.jfronny.inceptum.common;
|
2022-07-04 13:22:28 +02:00
|
|
|
|
2023-11-08 09:15:59 +01:00
|
|
|
import io.gitlab.jfronny.commons.http.client.HttpClient;
|
|
|
|
import io.gitlab.jfronny.commons.logging.Logger;
|
|
|
|
import io.gitlab.jfronny.commons.logging.StdoutLogger;
|
2022-07-04 13:22:28 +02:00
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
public class InceptumEnvironmentInitializer {
|
|
|
|
public static void initialize() throws IOException {
|
2022-09-06 21:20:59 +02:00
|
|
|
Logger.registerFactory(InceptumEnvironmentInitializer::defaultFactory);
|
2023-11-08 09:15:59 +01:00
|
|
|
HttpClient.setUserAgent("jfmods/inceptum/" + BuildMetadata.VERSION);
|
2022-09-07 18:06:34 +02:00
|
|
|
InceptumConfig.load();
|
2022-07-04 13:22:28 +02:00
|
|
|
}
|
2022-09-06 21:20:59 +02:00
|
|
|
|
|
|
|
public static Logger defaultFactory(String name) {
|
2022-11-18 21:58:40 +01:00
|
|
|
return StdoutLogger.fancy(name);
|
2022-09-06 21:20:59 +02:00
|
|
|
}
|
2022-07-04 13:22:28 +02:00
|
|
|
}
|