use of com.codingchili.core.logging.ConsoleLogger in project chili-core by codingchili.
the class ConfigurationsTest method testLoadDefaultsFromConfigurable.
@Test
public void testLoadDefaultsFromConfigurable(TestContext test) {
Async async = test.async();
Configurations.setWarnOnDefaultsLoaded(true);
Configurations.initialize(new ContextMock(context) {
@Override
public Logger logger(Class aClass) {
return new ConsoleLogger(aClass) {
@Override
public void onConfigurationDefaultsLoaded(String path, Class<?> clazz) {
if (path.equals(CoreStrings.testFile(CONFIGURATIONS, DEFAULT_JSON))) {
Configurations.reset();
async.complete();
}
}
};
}
});
load(CoreStrings.testFile(CONFIGURATIONS, DEFAULT_JSON), ConfigurableTest.class);
}
use of com.codingchili.core.logging.ConsoleLogger in project ethereum-ingest by codingchili.
the class VersionCommand method execute.
@Override
public void execute(Future<Boolean> future, CommandExecutor executor) {
new ConsoleLogger(getClass()).log("Current version is " + launcher().getVersion());
future.complete(true);
}
Aggregations