本文整理匯總了Java中io.vertx.core.logging.LoggerFactory類的典型用法代碼示例。如果您正苦於以下問題:Java LoggerFactory類的具體用法?Java LoggerFactory怎麽用?Java LoggerFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
LoggerFactory類屬於io.vertx.core.logging包,在下文中一共展示了LoggerFactory類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: apply
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
@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();
}
}
}
};
}
示例2: VolumeV1
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
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");
}
示例3: LoggingAppender
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
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;
}
示例4: ConfigurationProvider
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
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);
}
示例5: init
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
/**
* 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);
}
示例6: getLogger
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
protected Logger getLogger() {
return LoggerFactory.getLogger(getClass());
}
示例7: Log4JAnnal
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
public Log4JAnnal(final Class<?> clazz) {
this.logger = LoggerFactory.getLogger(clazz);
}
示例8: VerticleHelper
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
public VerticleHelper(Class clazz) {
this.logger = LoggerFactory.getLogger(clazz);
}
示例9: get
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
public static Logger get() {
System.setProperty("vertx.logger-delegate-factory-class-name",
"io.vertx.core.logging.SLF4JLogDelegateFactory");
return LoggerFactory.getLogger("okapi");
}
示例10: main
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
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();
}
示例11: SlaveRunner
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
public SlaveRunner() {
super();
logger = LoggerFactory.getLogger(getClass());
}
示例12: MasterRunner
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
public MasterRunner() {
super();
logger = LoggerFactory.getLogger(getClass());
}
示例13: AbstractRunner
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
public AbstractRunner() {
vertx = Vertx.vertx();
System.setProperty("vertx.logger-delegate-factory-class-name",
"io.vertx.core.logging.SLF4JLogDelegateFactory");
logger = LoggerFactory.getLogger(getClass());
}
示例14: getLog
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
@Override
public Log getLog(Class clazz) {
return new JGroupsLoggerAdapter(LoggerFactory.getLogger(clazz));
}
示例15: LogManager
import io.vertx.core.logging.LoggerFactory; //導入依賴的package包/類
LogManager(String prefix, Class<?> clazz) {
_logger = LoggerFactory.getLogger(LinkManager.class);
_prefix = prefix;
}