当前位置: 首页>>代码示例>>Java>>正文


Java LoggerFactory类代码示例

本文整理汇总了Java中org.vertx.java.core.logging.impl.LoggerFactory的典型用法代码示例。如果您正苦于以下问题:Java LoggerFactory类的具体用法?Java LoggerFactory怎么用?Java LoggerFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LoggerFactory类属于org.vertx.java.core.logging.impl包,在下文中一共展示了LoggerFactory类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import org.vertx.java.core.logging.impl.LoggerFactory; //导入依赖的package包/类
@Override
public void start(final Future<Void> startResult) {
  component = Components.createComponent(vertx, container);
  context = component.context();
  cluster = component.cluster();
  logger = component.logger();
  input = component.input();
  output = component.output();
  vertigo = new Vertigo(this);
  log = LoggerFactory.getLogger(String.format("%s-%s", getClass().getCanonicalName(), context.address()));

  log.info(String.format("%s - Starting", component));
  component.start(new Handler<AsyncResult<Void>>() {
    @Override
    public void handle(AsyncResult<Void> result) {
      if (result.failed()) {
        startResult.setFailure(result.cause());
      } else {
        ComponentVerticle.super.start(startResult);
      }
    }
  });
}
 
开发者ID:kuujo,项目名称:vertigo,代码行数:24,代码来源:ComponentVerticle.java

示例2: getLogger

import org.vertx.java.core.logging.impl.LoggerFactory; //导入依赖的package包/类
/**
 * Creates an output port logger with the given name.
 *
 * @param name The logger name.
 * @param output The output to which to log messages.
 * @return An output port logger.
 */
public static PortLogger getLogger(String name, OutputCollector output) {
  Args.checkNotNull(name, "logger name cannot be null");
  Map<OutputCollector, PortLogger> loggers = PortLoggerFactory.loggers.get(name);
  if (loggers == null) {
    loggers = new HashMap<>();
    PortLoggerFactory.loggers.put(name, loggers);
  }

  PortLogger logger = loggers.get(output);
  if (logger == null) {
    logger = new PortLogger(LoggerFactory.getLogger(name), output);
    loggers.put(output, logger);
  }
  return logger;
}
 
开发者ID:kuujo,项目名称:vertigo,代码行数:23,代码来源:PortLoggerFactory.java

示例3: DefaultComponent

import org.vertx.java.core.logging.impl.LoggerFactory; //导入依赖的package包/类
protected DefaultComponent(InstanceContext context, Vertx vertx, Container container, Cluster cluster) {
  this.address = context.address();
  this.log = LoggerFactory.getLogger(String.format("%s-%s", DefaultComponent.class.getName(), address));
  this.vertx = vertx;
  this.container = container;
  this.context = context;
  this.cluster = cluster;
  this.coordinator = new DefaultComponentCoordinator(context, vertx, cluster);
  this.input = new DefaultInputCollector(vertx, context.input());
  this.output = new DefaultOutputCollector(vertx, context.output());
  this.logger = PortLoggerFactory.getLogger(String.format("%s-%s", getClass().getCanonicalName(), address), output);
}
 
开发者ID:kuujo,项目名称:vertigo,代码行数:13,代码来源:DefaultComponent.java

示例4: DefaultComponentCoordinator

import org.vertx.java.core.logging.impl.LoggerFactory; //导入依赖的package包/类
public DefaultComponentCoordinator(InstanceContext context, Vertx vertx, Cluster cluster) {
  this.address = context.address();
  this.log = LoggerFactory.getLogger(String.format("%s-%s", DefaultComponentCoordinator.class.getName(), address));
  this.vertx = vertx;
  this.currentContext = context;
  this.cluster = cluster;
}
 
开发者ID:kuujo,项目名称:vertigo,代码行数:8,代码来源:DefaultComponentCoordinator.java

示例5: DefaultOutputStream

import org.vertx.java.core.logging.impl.LoggerFactory; //导入依赖的package包/类
public DefaultOutputStream(Vertx vertx, OutputStreamContext context) {
  this.vertx = vertx;
  this.context = context;
  this.log = LoggerFactory.getLogger(String.format("%s-%s", DefaultOutputStream.class.getName(), context.port().toString()));
  for (OutputConnectionContext connection : context.connections()) {
    connections.add(new DefaultOutputConnection(vertx, connection));
  }
  this.selector = context.selector();
}
 
开发者ID:kuujo,项目名称:vertigo,代码行数:10,代码来源:DefaultOutputStream.java

示例6: DefaultInputConnection

import org.vertx.java.core.logging.impl.LoggerFactory; //导入依赖的package包/类
public DefaultInputConnection(Vertx vertx, InputConnectionContext context) {
  this.vertx = vertx;
  this.eventBus = vertx.eventBus();
  this.context = context;
  this.inAddress = String.format("%s.in", context.address());
  this.outAddress = String.format("%s.out", context.address());
  this.log = LoggerFactory.getLogger(String.format("%s-%s", DefaultInputConnection.class.getName(), context.address()));
  this.hooks = context.hooks();
}
 
开发者ID:kuujo,项目名称:vertigo,代码行数:10,代码来源:DefaultInputConnection.java

示例7: DefaultOutputConnection

import org.vertx.java.core.logging.impl.LoggerFactory; //导入依赖的package包/类
public DefaultOutputConnection(Vertx vertx, OutputConnectionContext context) {
  this.vertx = vertx;
  this.eventBus = vertx.eventBus();
  this.context = context;
  this.hooks = context.hooks();
  this.outAddress = String.format("%s.out", context.address());
  this.inAddress = String.format("%s.in", context.address());
  this.log = LoggerFactory.getLogger(String.format("%s-%s", DefaultOutputConnection.class.getName(), context.target()));
}
 
开发者ID:kuujo,项目名称:vertigo,代码行数:10,代码来源:DefaultOutputConnection.java

示例8: DefaultInputCollector

import org.vertx.java.core.logging.impl.LoggerFactory; //导入依赖的package包/类
public DefaultInputCollector(Vertx vertx) {
  this.vertx = vertx;
  this.log = LoggerFactory.getLogger(DefaultInputCollector.class);
}
 
开发者ID:kuujo,项目名称:vertigo,代码行数:5,代码来源:DefaultInputCollector.java

示例9: DefaultOutputCollector

import org.vertx.java.core.logging.impl.LoggerFactory; //导入依赖的package包/类
public DefaultOutputCollector(Vertx vertx) {
  this.vertx = vertx;
  this.log = LoggerFactory.getLogger(DefaultOutputCollector.class);
}
 
开发者ID:kuujo,项目名称:vertigo,代码行数:5,代码来源:DefaultOutputCollector.java


注:本文中的org.vertx.java.core.logging.impl.LoggerFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。