2022-09-04 21:21:24 +02:00
|
|
|
package io.gitlab.jfronny.inceptum.common;
|
2022-07-04 13:22:28 +02:00
|
|
|
|
|
|
|
import io.gitlab.jfronny.commons.HttpUtils;
|
2022-09-06 21:20:59 +02:00
|
|
|
import io.gitlab.jfronny.commons.log.Logger;
|
|
|
|
import io.gitlab.jfronny.commons.log.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);
|
2022-11-18 21:58:40 +01:00
|
|
|
HttpUtils.userAgent = "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
|
|
|
}
|