當前位置: 首頁>>代碼示例>>Java>>正文


Java Logger.lifecycle方法代碼示例

本文整理匯總了Java中org.gradle.api.logging.Logger.lifecycle方法的典型用法代碼示例。如果您正苦於以下問題:Java Logger.lifecycle方法的具體用法?Java Logger.lifecycle怎麽用?Java Logger.lifecycle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.gradle.api.logging.Logger的用法示例。


在下文中一共展示了Logger.lifecycle方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: DependencyConfigs

import org.gradle.api.logging.Logger; //導入方法依賴的package包/類
public DependencyConfigs(@Nonnull final Project pProject)
{
    project = pProject;
    buildUtil = new BuildUtil(pProject);
    depConfigDir = new File(pProject.getProjectDir(), "project/dependencyConfigs");
    final FileCollection listOfDepConfigFiles = readListOfDepConfigs(depConfigDir);
    depConfigs = readAllDependencyVersions(listOfDepConfigFiles);

    if (getDefault() == null || !DEFAULT_NAME.equals(getDefault().getName()) || !getDefault().isDefaultConfig()) {
        throw new GradleException("corrupt default dependency configuration");
    }

    final Logger log = pProject.getLogger();
    log.lifecycle("Default Checkstyle version: " + getDefault().getCheckstyleBaseVersion());
    log.lifecycle("Active dependency configurations:");
    for (Map.Entry<String, DependencyConfig> entry : depConfigs.entrySet()) {
        DependencyConfig depConfig = entry.getValue();
        log.lifecycle("  - " + entry.getKey() + ": Checkstyle " + depConfig.getCheckstyleBaseVersion() //
            + ", Java " + depConfig.getJavaLevel() //
            + ", compatible: " + depConfig.getCompatibleCheckstyleVersions());
    }
}
 
開發者ID:checkstyle-addons,項目名稱:checkstyle-addons,代碼行數:23,代碼來源:DependencyConfigs.java

示例2: logHealth

import org.gradle.api.logging.Logger; //導入方法依賴的package包/類
public void logHealth(DaemonHealthStats stats, Logger logger) {
    if (Boolean.getBoolean(HEALTH_MESSAGE_PROPERTY)) {
        logger.lifecycle(stats.getHealthInfo());
    } else {
        //the default
        logger.info(stats.getHealthInfo());
    }
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:9,代碼來源:HealthLogger.java

示例3: run

import org.gradle.api.logging.Logger; //導入方法依賴的package包/類
String run(Logger log, List<String> commandLine) {
    // WARNING!!! ensure that masked command line is used for all logging!!!
    String maskedCommandLine = mask(join(commandLine, " "));
    log.lifecycle("  Executing:\n    " + maskedCommandLine);

    ProcessResult result = executeProcess(commandLine, maskedCommandLine);

    if (result.getExitValue() != 0) {
        return executionOfCommandFailed(maskedCommandLine, result);
    } else {
        String output = result.getOutput();
        LOG.info("Output from external process '{}':\n{}", maskedCommandLine, output);
        return output;
    }
}
 
開發者ID:mockito,項目名稱:shipkit,代碼行數:16,代碼來源:DefaultProcessRunner.java

示例4: downloadMcJson

import org.gradle.api.logging.Logger; //導入方法依賴的package包/類
public static void downloadMcJson(LoomGradleExtension extension, Logger logger) throws IOException {
	if (!Constants.MINECRAFT_JSON.get(extension).exists()) {
		logger.lifecycle(":downloading minecraft json");
		FileUtils.copyURLToFile(new URL("https://launchermeta.mojang.com/mc/game/version_manifest.json"), Constants.VERSION_MANIFEST.get(extension));
		ManifestVersion mcManifest = new GsonBuilder().create().fromJson(FileUtils.readFileToString(Constants.VERSION_MANIFEST.get(extension), "UTF-8"), ManifestVersion.class);

		Optional<ManifestVersion.Versions> optionalVersion = mcManifest.versions.stream().filter(versions -> versions.id.equalsIgnoreCase(extension.version)).findFirst();
		if (optionalVersion.isPresent()) {
			FileUtils.copyURLToFile(new URL(optionalVersion.get().url), Constants.MINECRAFT_JSON.get(extension));
		} else {
			logger.info(":failed downloading minecraft json");
			throw new RuntimeException("Failed downloading Minecraft json");
		}
	}
}
 
開發者ID:FabricMC,項目名稱:fabric-loom,代碼行數:16,代碼來源:DownloadTask.java

示例5: uninstall

import org.gradle.api.logging.Logger; //導入方法依賴的package包/類
@TaskAction
public void uninstall() throws DeviceException {
    final Logger logger = getLogger();
    final String applicationId = variant.getApplicationId();

    logger.info("Uninstalling app: {}", applicationId);

    final ILogger lifecycleLogger = new LoggerWrapper(getLogger(), LogLevel.LIFECYCLE);
    final DeviceProvider deviceProvider =
            new ConnectedDeviceProvider(getAdbExe(), lifecycleLogger);

    deviceProvider.init();
    final List<? extends DeviceConnector> devices = deviceProvider.getDevices();

    for (DeviceConnector device : devices) {
        device.uninstallPackage(applicationId, getTimeOutInMs(), getILogger());
        logger.lifecycle(
                "Uninstalling {} (from {}:{}) from device '{}' ({}).",
                applicationId, getProject().getName(),
                variant.getVariantConfiguration().getFullName(),
                device.getName(), device.getSerialNumber());
    }

    int n = devices.size();
    logger.quiet("Uninstalled {} from {} device{}.",
            applicationId, n, n == 1 ? "" : "s");

}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:29,代碼來源:UninstallTask.java

示例6: DeviceFarmClientFactory

import org.gradle.api.logging.Logger; //導入方法依賴的package包/類
public DeviceFarmClientFactory(final Logger logger) {
    this.pluginVersion = readPluginVersion();
    logger.lifecycle("AWS Device Farm Plugin version " + pluginVersion);
}
 
開發者ID:awslabs,項目名稱:aws-device-farm-gradle-plugin,代碼行數:5,代碼來源:DeviceFarmClientFactory.java


注:本文中的org.gradle.api.logging.Logger.lifecycle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。