• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java Slf4jLevel类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中de.flapdoodle.embed.process.io.Slf4jLevel的典型用法代码示例。如果您正苦于以下问题:Java Slf4jLevel类的具体用法?Java Slf4jLevel怎么用?Java Slf4jLevel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

Slf4jLevel类属于de.flapdoodle.embed.process.io包,在下文中一共展示了Slf4jLevel类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: start

点赞 2

import de.flapdoodle.embed.process.io.Slf4jLevel; //导入依赖的package包/类
public synchronized void start() throws IOException {
	if (process != null) {
		throw new IllegalStateException();
	}

	Command command = Command.Postgres;

	IDownloadConfig downloadConfig = new PostgresDownloadConfigBuilder()
			.defaultsForCommand(command)
			.artifactStorePath(new FixedPath(artifactStorePath))
			.build();

	ArtifactStoreBuilder artifactStoreBuilder = new PostgresArtifactStoreBuilder()
			.defaults(command)
			.download(downloadConfig);

	LogWatchStreamProcessor logWatch = new LogWatchStreamProcessor("started",
			new HashSet<>(singletonList("failed")),
			new Slf4jStreamProcessor(getLogger("postgres"), Slf4jLevel.TRACE));

	IRuntimeConfig runtimeConfig = new RuntimeConfigBuilder()
			.defaults(command)
			.processOutput(new ProcessOutput(logWatch, logWatch, logWatch))
			.artifactStore(artifactStoreBuilder)
			.build();

	PostgresStarter<PostgresExecutable, PostgresProcess> starter = new PostgresStarter<>(PostgresExecutable.class, runtimeConfig);

	PostgresConfig config = new PostgresConfig(version,
			new AbstractPostgresConfig.Net(host, port == 0 ? Network.getFreeServerPort() : port),
			new AbstractPostgresConfig.Storage(dbName),
			new AbstractPostgresConfig.Timeout(),
			new AbstractPostgresConfig.Credentials(username, password));
	process = starter.prepare(config).start();
	jdbcUrl = "jdbc:postgresql://" + config.net().host() + ":" + config.net().port() + "/" + config.storage().dbName();
}
 

开发者ID:honourednihilist,
项目名称:gradle-postgresql-embedded,
代码行数:37,
代码来源:EmbeddedPostgres.java

示例2: embeddedMongoRuntimeConfig

点赞 2

import de.flapdoodle.embed.process.io.Slf4jLevel; //导入依赖的package包/类
@Bean
public IRuntimeConfig embeddedMongoRuntimeConfig() {
	Logger logger = LoggerFactory
			.getLogger(getClass().getPackage().getName() + ".EmbeddedMongo");
	ProcessOutput processOutput = new ProcessOutput(
			Processors.logTo(logger, Slf4jLevel.INFO),
			Processors.logTo(logger, Slf4jLevel.ERROR), Processors.named(
					"[console>]", Processors.logTo(logger, Slf4jLevel.DEBUG)));
	return new RuntimeConfigBuilder().defaultsWithLogger(Command.MongoD, logger)
			.processOutput(processOutput).artifactStore(getArtifactStore(logger))
			.build();
}
 

开发者ID:vikrammane23,
项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,
代码行数:13,
代码来源:EmbeddedMongoAutoConfiguration.java

示例3: startMongo

点赞 2

import de.flapdoodle.embed.process.io.Slf4jLevel; //导入依赖的package包/类
private void startMongo(final List<IMongodConfig> mongodConfigList) throws IOException {
    // @formatter:off
    final ProcessOutput processOutput = new ProcessOutput(
            logTo(LOGGER, Slf4jLevel.INFO),
            logTo(LOGGER, Slf4jLevel.ERROR),
            named("[console>]", logTo(LOGGER, Slf4jLevel.DEBUG)));

    final IRuntimeConfig runtimeConfig = new RuntimeConfigBuilder()
            .defaultsWithLogger(Command.MongoD,LOGGER)
            .processOutput(processOutput)
            .artifactStore(new ExtractedArtifactStoreBuilder()
                .defaults(Command.MongoD)
                .download(new DownloadConfigBuilder()
                    .defaultsForCommand(Command.MongoD)
                    .progressListener(new Slf4jProgressListener(LOGGER))
                    .build()))
            .build();
    // @formatter:on
    final MongodStarter starter = MongodStarter.getInstance(runtimeConfig);

    for (final IMongodConfig mongodConfig : mongodConfigList) {
        final MongodExecutable mongodExecutable = starter.prepare(mongodConfig);
        final MongodProcess mongod = mongodExecutable.start();

        mongoProcesses.put(mongod, mongodExecutable);
    }
}
 

开发者ID:dadrus,
项目名称:jpa-unit,
代码行数:28,
代码来源:MongodManager.java

示例4: embeddedMongoRuntimeConfig

点赞 2

import de.flapdoodle.embed.process.io.Slf4jLevel; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
@ConditionalOnClass(Logger.class)
public IRuntimeConfig embeddedMongoRuntimeConfig() {
	Logger logger = LoggerFactory
			.getLogger(getClass().getPackage().getName() + ".EmbeddedMongo");
	ProcessOutput processOutput = new ProcessOutput(
			Processors.logTo(logger, Slf4jLevel.INFO),
			Processors.logTo(logger, Slf4jLevel.ERROR), Processors.named("[console>]",
					Processors.logTo(logger, Slf4jLevel.DEBUG)));
	return new RuntimeConfigBuilder().defaultsWithLogger(Command.MongoD, logger)
			.processOutput(processOutput).artifactStore(getArtifactStore(logger))
			.build();
}
 

开发者ID:Nephilim84,
项目名称:contestparser,
代码行数:15,
代码来源:EmbeddedMongoAutoConfiguration.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)