io.vertx.core.impl.logging.LoggerFactory Java Examples

The following examples show how to use io.vertx.core.impl.logging.LoggerFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RunTestOnContext.java    From vertx-unit with Apache License 2.0 6 votes vote down vote up
@Override
public Statement apply(Statement base, Description description) {
  return new Statement() {
    @Override
    public void evaluate() throws Throwable {
      vertx = createVertx.get();
      try {
        Context context = vertx != null ? vertx.getOrCreateContext() : null;
        VertxUnitRunner.pushContext(context);
        base.evaluate();
      } finally {
        VertxUnitRunner.popContext();
        CountDownLatch latch = new CountDownLatch(1);
        closeVertx.accept(vertx, latch);
        try {
          if (!latch.await(30 * 1000, TimeUnit.MILLISECONDS)) {
            Logger logger = LoggerFactory.getLogger(description.getTestClass());
            logger.warn("Could not close Vert.x in tme");
          }
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
        }
      }
    }
  };
}
 
Example #2
Source File: ConfigurationProvider.java    From vertx-config with Apache License 2.0 5 votes vote down vote up
public ConfigurationProvider(ConfigStore store, ConfigProcessor processor, JsonObject config, boolean optional) {
  this.store = store;
  this.processor = processor;
  this.optional = optional;
  if (config == null) {
    this.configuration = new JsonObject();
  } else {
    this.configuration = config;
  }
  this.logger = LoggerFactory.getLogger("ConfigurationProvider#" + store);
}