Java 类io.vertx.core.logging.LoggerFactory 实例源码

项目:vertx-unit    文件:RunTestOnContext.java   
@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();
        }
      }
    }
  };
}
项目:sfs    文件:VolumeV1.java   
public VolumeV1(Path path) {
    this.basePath = path;
    this.metaFilePath = metaFilePath(basePath);
    this.dataFilePath = dataFilePath(basePath);
    this.indexFilePath = indexFilePath(basePath);
    logger = LoggerFactory.getLogger(VolumeV1.class.getName() + "." + join(basePath));
    gcLogger = LoggerFactory.getLogger(VolumeV1.class.getName() + "." + join(basePath) + ".gc");
}
项目:vertx-web-accesslog    文件:LoggingAppender.java   
public LoggingAppender(final LoggingAppenderOptions appenderOptions, final Collection<AccessLogElement> accessLogElements){

    if(appenderOptions == null){
        throw new IllegalArgumentException("appenderOptions must not be null");
    }

    if(accessLogElements == null || accessLogElements.size() < 1){
        throw new IllegalArgumentException("accessLogElements must contain at least one element");
    }

    this.logger = LoggerFactory.getLogger(appenderOptions.getLoggerName());
    this.accessLogElements = accessLogElements;

}
项目:vertx-config    文件:ConfigurationProvider.java   
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);
}
项目:mesh    文件:LoggingConfigurator.java   
/**
 * Initialize the logback logger and ensure that the logback file is placed in the config folder
 */
public static void init() {

    File logbackFile = new File("config", "logback.xml");
    if (!logbackFile.exists()) {
        writeFile(logbackFile);
    }
    System.setProperty("logback.configurationFile", logbackFile.getAbsolutePath());
    System.setProperty(LoggerFactory.LOGGER_DELEGATE_FACTORY_CLASS_NAME, SLF4JLogDelegateFactory.class.getName());
    LoggerFactory.getLogger(LoggingConfigurator.class);
}
项目:vertx-zero    文件:TestBase.java   
protected Logger getLogger() {
    return LoggerFactory.getLogger(getClass());
}
项目:vertx-zero    文件:Log4JAnnal.java   
public Log4JAnnal(final Class<?> clazz) {
    this.logger = LoggerFactory.getLogger(clazz);
}
项目:vertx-swagger    文件:VerticleHelper.java   
public VerticleHelper(Class clazz) {
    this.logger = LoggerFactory.getLogger(clazz);
}
项目:vertx-swagger    文件:VerticleHelper.java   
public VerticleHelper(Class clazz) {
    this.logger = LoggerFactory.getLogger(clazz);
}
项目:vertx-swagger    文件:VerticleHelper.java   
public VerticleHelper(Class clazz) {
    this.logger = LoggerFactory.getLogger(clazz);
}
项目:vertx-swagger    文件:VerticleHelper.java   
public VerticleHelper(Class clazz) {
    this.logger = LoggerFactory.getLogger(clazz);
}
项目:okapi    文件:OkapiLogger.java   
public static Logger get() {
  System.setProperty("vertx.logger-delegate-factory-class-name",
    "io.vertx.core.logging.SLF4JLogDelegateFactory");
  return LoggerFactory.getLogger("okapi");
}
项目:mesh    文件:DemoRunner.java   
public static void main(String[] args) throws Exception {
    LoggingConfigurator.init();
    log = LoggerFactory.getLogger(DemoRunner.class);
    // Extract dump file on first time startup to speedup startup
    setupDemo();

    MeshOptions options = OptionsLoader.createOrloadOptions(args);

    // For Mesh UI Dev
    // options.getHttpServerOptions().setEnableCors(true);
    // options.getHttpServerOptions().setCorsAllowCredentials(true);
    // options.getHttpServerOptions().setCorsAllowedOriginPattern("http://localhost:5000");
    // options.getSearchOptions().setHttpEnabled(true);
    // options.getStorageOptions().setStartServer(true);
    // options.getSearchOptions().setHttpEnabled(true);
    // options.getStorageOptions().setDirectory(null);
    // options.setClusterMode(true);

    Mesh mesh = Mesh.mesh(options);
    mesh.setCustomLoader((vertx) -> {
        JsonObject config = new JsonObject();
        config.put("port", options.getHttpServerOptions().getPort());
        MeshComponent meshInternal = MeshInternal.get();
        EndpointRegistry registry = meshInternal.endpointRegistry();

        // Add demo content provider
        registry.register(DemoAppEndpoint.class);
        DemoDataProvider data = new DemoDataProvider(meshInternal.database(), meshInternal.meshLocalClientImpl(), meshInternal.boot());
        DemoVerticle demoVerticle = new DemoVerticle(data);
        DeploymentUtil.deployAndWait(vertx, config, demoVerticle, false);

        // Add admin ui
        registry.register(AdminGUIEndpoint.class);

        // // Add elastichead
        // if (options.getSearchOptions().isHttpEnabled()) {
        // registry.register(ElasticsearchHeadEndpoint.class);
        // }
    });
    mesh.run();
}
项目:tentacles    文件:SlaveRunner.java   
public SlaveRunner() {
    super();
    logger = LoggerFactory.getLogger(getClass());
}
项目:tentacles    文件:MasterRunner.java   
public MasterRunner() {
    super();
    logger = LoggerFactory.getLogger(getClass());
}
项目:tentacles    文件:AbstractRunner.java   
public AbstractRunner() {
    vertx = Vertx.vertx();
    System.setProperty("vertx.logger-delegate-factory-class-name",
            "io.vertx.core.logging.SLF4JLogDelegateFactory");
    logger = LoggerFactory.getLogger(getClass());
}
项目:vertx-infinispan    文件:JGroupsLogFactory.java   
@Override
public Log getLog(Class clazz) {
  return new JGroupsLoggerAdapter(LoggerFactory.getLogger(clazz));
}
项目:vertx-infinispan    文件:JGroupsLogFactory.java   
@Override
public Log getLog(String category) {
  return new JGroupsLoggerAdapter(LoggerFactory.getLogger(category));
}
项目:vertx-amqp-service    文件:LogManager.java   
LogManager(String prefix, Class<?> clazz) {
  _logger = LoggerFactory.getLogger(LinkManager.class);
  _prefix = prefix;
}
项目:usher    文件:LogOutput.java   
public LogSinkStream() {
    logger = LoggerFactory.getLogger(configObj.getString("name", "default_log"));
}
项目:apiman    文件:VertxLoggerDelegate.java   
@Override
public IApimanLogger createLogger(String name) {
    return new VertxApimanLogger(LoggerFactory.getLogger(name));
}
项目:apiman    文件:VertxLoggerDelegate.java   
@Override
public IApimanLogger createLogger(Class<?> klazz) {
    return new VertxApimanLogger(LoggerFactory.getLogger(klazz));
}