fix(config-core): Clean up logging
This commit is contained in:
parent
460d75ba49
commit
d7d1655ad8
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue