fix(config-core): Clean up logging
ci/woodpecker/push/docs Pipeline was successful Details
ci/woodpecker/push/jfmod Pipeline was successful Details
ci/woodpecker/tag/docs Pipeline was successful Details
ci/woodpecker/tag/jfmod Pipeline was successful Details

This commit is contained in:
Johannes Frohnmeyer 2023-07-16 14:45:28 +02:00
parent 460d75ba49
commit d7d1655ad8
Signed by: Johannes
GPG Key ID: E76429612C2929F4
2 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,6 @@
package io.gitlab.jfronny.libjf.config.api.v1;
import io.gitlab.jfronny.libjf.LibJf;
import io.gitlab.jfronny.libjf.config.impl.ConfigHolderImpl;
import java.nio.file.Path;
@ -14,6 +15,7 @@ public interface ConfigHolder {
* @return The config holder
*/
static ConfigHolder getInstance() {
LibJf.setup();
return ConfigHolderImpl.INSTANCE;
}

View File

@ -1,17 +1,13 @@
package io.gitlab.jfronny.libjf.config.impl.watch;
import io.gitlab.jfronny.commons.throwable.ThrowingRunnable;
import io.gitlab.jfronny.libjf.LibJf;
import java.io.Closeable;
import java.nio.file.Path;
public interface JfConfigWatchService extends Closeable {
static <TEx extends Throwable> void lock(Path p, ThrowingRunnable<TEx> task) throws TEx {
JfConfigWatchServiceImpl.lock(p, task
.compose(() -> LibJf.LOGGER.info("Locking"))
.andThen(() -> LibJf.LOGGER.info("Ran task after lock"))
);
JfConfigWatchServiceImpl.lock(p, task);
}
void executeIteration();