本文整理汇总了Java中org.vertx.java.core.logging.impl.LoggerFactory.getLogger方法的典型用法代码示例。如果您正苦于以下问题:Java LoggerFactory.getLogger方法的具体用法?Java LoggerFactory.getLogger怎么用?Java LoggerFactory.getLogger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.vertx.java.core.logging.impl.LoggerFactory
的用法示例。
在下文中一共展示了LoggerFactory.getLogger方法的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);
}
}
});
}
示例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;
}
示例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);
}
示例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;
}
示例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();
}
示例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();
}
示例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()));
}
示例8: DefaultInputCollector
import org.vertx.java.core.logging.impl.LoggerFactory; //导入方法依赖的package包/类
public DefaultInputCollector(Vertx vertx) {
this.vertx = vertx;
this.log = LoggerFactory.getLogger(DefaultInputCollector.class);
}
示例9: DefaultOutputCollector
import org.vertx.java.core.logging.impl.LoggerFactory; //导入方法依赖的package包/类
public DefaultOutputCollector(Vertx vertx) {
this.vertx = vertx;
this.log = LoggerFactory.getLogger(DefaultOutputCollector.class);
}