org.gradle.api.logging.Logger.info()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(164)

本文整理了Java中org.gradle.api.logging.Logger.info()方法的一些代码示例,展示了Logger.info()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.info()方法的具体详情如下:
包路径:org.gradle.api.logging.Logger
类名称:Logger
方法名:info

Logger.info介绍

[英]Logs the given message at info log level.
[中]在信息日志级别记录给定消息。

代码示例

代码示例来源:origin: linkedin/rest.li

LOG.info("Compiling Scala resource classes. Disabling pathing jar for " + taskName + " to avoid breaking Scala compilation");
return classpath;

代码示例来源:origin: jooby-project/jooby

CharSequence summary = compiler
  .summary(fileset, output.toPath(), env, end - start, "        " + assemblyOutput, "Assets: " + distFile);
logger.info(summary.toString());

代码示例来源:origin: jooby-project/jooby

getLogger().info("compiler is {}", compiler);
if ("on".equalsIgnoreCase(compiler)) {
 Path[] watchDirs = getSrc().stream().filter(File::exists).map(File::toPath).toArray(Path[]::new);
 getLogger().info("watching directories {}", Arrays.asList(watchDirs));

代码示例来源:origin: linkedin/rest.li

getLogger().info("idlFiles: " + idlFiles.getAsPath());
getLogger().info("snapshotFiles: " + snapshotFiles.getAsPath());

代码示例来源:origin: hibernate/hibernate-orm

if ( enhancedBytecode != null ) {
  writeOutEnhancedClass( enhancedBytecode, file );
  logger.info( "Successfully enhanced class [" + file + "]" );
  logger.info( "Skipping class [" + file.getAbsolutePath() + "], not an entity nor embeddable" );

代码示例来源:origin: jooby-project/jooby

@TaskAction
public void process() throws Throwable {
 Project project = getProject();
 JoobyProject joobyProject = new JoobyProject(project);
 String mainClass = getMainClassName();
 try (URLClassLoader loader = joobyProject.newClassLoader()) {
  getLogger().debug("Using classloader " + loader);
  Path srcdir = project.getProjectDir().toPath();
  Path bindir = joobyProject.classes().toPath();
  Path output = new ApiParser(srcdir)
    .with(loader)
    .export(bindir, mainClass);
  getLogger().info("API file: " + output);
 }
}

代码示例来源:origin: diffplug/spotless

@SuppressFBWarnings("NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE")
  static void check(SpotlessTask task, Formatter formatter, List<File> problemFiles) throws IOException {
    if (problemFiles.isEmpty()) {
      // if the first pass was successful, then paddedCell() mode is unnecessary
      task.getLogger().info(StringPrinter.buildStringFromLines(
          task.getName() + " is in paddedCell() mode, but it doesn't need to be.",
          "If you remove that option, spotless will run ~2x faster.",
          "For details see " + URL));
    }

    File diagnoseDir = diagnoseDir(task);
    File rootDir = task.getProject().getRootDir();
    List<File> stillFailing = PaddedCellBulk.check(rootDir, diagnoseDir, formatter, problemFiles);
    if (!stillFailing.isEmpty()) {
      throw task.formatViolationsFor(formatter, problemFiles);
    }
  }
}

代码示例来源:origin: linkedin/pygradle

static void probeVenv(Project project, PythonDetails pythonDetails,
               EditablePythonAbiContainer editablePythonAbiContainer) {
  try {
    doProbe(project, pythonDetails, editablePythonAbiContainer);
  } catch (IOException ioe) {
    logger.info("Unable to probe venv for supported wheel details. Ignoring Venv.");
  }
}

代码示例来源:origin: gradle.plugin.org.shipkit/shipkit

public void execute(Project project) {
    LOGGER.info("{} - executing deferred configuration using 'afterEvaluate'",
        project.getPath().equals(":") ? "Root project" : project.getPath());
    runnable.run();
  }
});

代码示例来源:origin: org.shipkit/shipkit

private JsonObject parseJsonFrom(URLConnection urlConnection) throws IOException, DeserializationException {
    InputStream response = urlConnection.getInputStream();

    String content = IOUtil.readFully(response);
    LOG.info("GitHub API responded successfully.");

    return (JsonObject) Jsoner.deserialize(content);
  }
}

代码示例来源:origin: org.gradle/gradle-core

public void graphPopulated(TaskExecutionGraph graph) {
  if (logger.isInfoEnabled()) {
    logger.info("Tasks to be executed: {}", graph.getAllTasks());
  }
}

代码示例来源:origin: org.gradle/gradle-core

public void projectsLoaded(Gradle gradle) {
  if (logger.isInfoEnabled()) {
    ProjectInternal projectInternal = (ProjectInternal) gradle.getRootProject();
    logger.info("Projects loaded. Root project using {}.",
      projectInternal.getBuildScriptSource().getDisplayName());
    logger.info("Included projects: {}", projectInternal.getAllprojects());
  }
}

代码示例来源:origin: org.gradle/gradle-core

@Override
  public BuildCacheStoreCommand.Result store(OutputStream output) throws IOException {
    LOGGER.info("Packing {}", task);
    final TaskOutputPacker.PackResult packResult = packer.pack(outputProperties, outputSnapshots, output, taskOutputOriginFactory.createWriter(task, clock.getElapsedMillis()));
    return new BuildCacheStoreCommand.Result() {
      @Override
      public long getArtifactEntryCount() {
        return packResult.getEntries();
      }
    };
  }
}

代码示例来源:origin: org.shipkit/shipkit

public void serialize(ContributorsSet contributorsSet) {
  Collection<Contributor> allContributors = contributorsSet.getAllContributors();
  String json = Jsoner.serialize(allContributors);
  LOG.info("Serialize contributors to: {}", json);
  IOUtil.writeFile(file, json);
}

代码示例来源:origin: org.shipkit/shipkit

public void discover(Project project) {
  PluginBundleExtension extension = project.getExtensions().findByType(PluginBundleExtension.class);
  Set<File> pluginPropertyFiles = PluginUtil.discoverGradlePluginPropertyFiles(project);
  LOG.lifecycle("  Adding {} discovered Gradle plugins to 'pluginBundle'", pluginPropertyFiles.size());
  for (File pluginPropertyFile : pluginPropertyFiles) {
    PluginConfig config = new PluginConfig(generatePluginName(pluginPropertyFile.getName()));
    config.setId(pluginPropertyFile.getName().substring(0, pluginPropertyFile.getName().lastIndexOf(DOT_PROPERTIES)));
    config.setDisplayName(PluginUtil.getImplementationClass(pluginPropertyFile));
    LOG.info("Discovered plugin " + config);
    extension.getPlugins().add(config);
  }
}

代码示例来源:origin: org.gradle/gradle-core

public void settingsEvaluated(Settings settings) {
  SettingsInternal settingsInternal = (SettingsInternal) settings;
  if (logger.isInfoEnabled()) {
    logger.info("Settings evaluated using {}.",
      settingsInternal.getSettingsScript().getDisplayName());
  }
}

代码示例来源:origin: junkdog/artemis-odb

@TaskAction
public void fluid() {
  log.info("Artemis Fluid api plugin started.");
  prepareGeneratedSourcesFolder();
  includeGeneratedSourcesInCompilation();
  new FluidGenerator().generate(
      classpathAsUrls(preferences),
      generatedSourcesDirectory, createLogAdapter(), preferences);
}

代码示例来源:origin: gradle.plugin.nl.javadude.gradle.plugins/license-gradle-plugin

@Override
public void onHeaderNotFound(Document document, Header header) {
  document.parseHeader();
  if (document.headerDetected() && skipExistingHeaders) {
    logger.info("Ignoring header in: {}", DocumentFactory.getRelativeFile(basedir, document));
    return;
  } else {
    logger.lifecycle("Missing header in: {}", DocumentFactory.getRelativeFile(basedir, document));
  }
  missingHeaders.add(document.getFile());
}

代码示例来源:origin: classmethod/gradle-aws-plugin

public void visitFile(FileVisitDetails element) {
    String key = prefix + element.getRelativePath();
    getLogger().info(" => s3://{}/{}", bucketName, key);
    Closure<ObjectMetadata> metadataProvider = getMetadataProvider();
    s3.putObject(new PutObjectRequest(bucketName, key, element.getFile())
      .withMetadata(metadataProvider == null ? null
          : metadataProvider.call(getBucketName(), key, element.getFile())));
  }
});

代码示例来源:origin: classmethod/gradle-aws-plugin

private void createAlias(AWSLambda lambda, String functionVersion) {
  CreateAliasRequest createAliasRequest = new CreateAliasRequest()
    .withFunctionName(getFunctionName())
    .withFunctionVersion(functionVersion)
    .withName(getAlias());
  
  CreateAliasResult createAliasResult = lambda.createAlias(createAliasRequest);
  
  getLogger().info("Create Lambda alias requested: {}",
      createAliasResult.getAliasArn());
}

相关文章