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

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

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

Logger.debug介绍

[英]Multiple-parameters friendly debug method
[中]多参数友好调试方法

代码示例

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

  1. private ClassLoader toClassLoader(FileCollection runtimeClasspath) {
  2. List<URL> urls = new ArrayList<URL>();
  3. for ( File file : runtimeClasspath ) {
  4. try {
  5. urls.add( file.toURI().toURL() );
  6. logger.debug( "Adding classpath entry for " + file.getAbsolutePath() );
  7. }
  8. catch (MalformedURLException e) {
  9. throw new GradleException( "Unable to resolve classpath entry to URL : " + file.getAbsolutePath(), e );
  10. }
  11. }
  12. return new URLClassLoader( urls.toArray( new URL[urls.size()] ), Enhancer.class.getClassLoader() );
  13. }

代码示例来源:origin: f2prateek/dart

  1. new UnionFileCollection(javaCompiler.getSource(), project.fileTree(destinationFolder));
  2. javaCompiler.setSource(uft);
  3. logger.debug("Analyzing configuration: " + variantCompileClasspath.getFiles());
  4. Set<String> targetActivities = new HashSet<>();
  5. Streams.stream(variantCompileClasspath)
  6. .forEach(
  7. dependency -> {
  8. logger.debug("Detected dependency: {}", dependency.getAbsolutePath());
  9. if (dependency.getName().endsWith(".jar")) {
  10. logger.debug("Detected navigation API dependency: {}", dependency.getName());
  11. if (!dependency.exists()) {
  12. logger.debug("Dependency jar doesn't exist {}", dependency.getAbsolutePath());
  13. } else {
  14. File file = dependency.getAbsoluteFile();
  15. entry -> {
  16. if (entry.matches(".*__IntentBuilder.class")) {
  17. logger.debug("Detected intent builder: {}", entry);
  18. String targetActivityFQN =
  19. entry
  20. File generatedFile = getHensonNavigatorSourceFile();
  21. try {
  22. logger.debug("Generating Henson navigator in " + generatedFile.getAbsolutePath());
  23. logger.debug(hensonNavigator);
  24. Files.write(generatedFile.toPath(), singletonList(hensonNavigator));
  25. } catch (IOException e) {

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

  1. output.mkdirs();
  2. logger.debug("claspath: " + loader);
  3. logger.debug("assets.conf: " + assetConf.getConfig("assets"));
  4. .toFile();
  5. to.getParentFile().mkdirs();
  6. logger.debug("copying file to: " + to);
  7. Files.copy(from, to);

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

  1. private void runTask(final ProjectConnection connection, final Path path, final String task) {
  2. synchronized (LOCK) {
  3. Map<String, String> xml = new HashMap<>();
  4. try {
  5. // clean jaxp
  6. XML_PROPS.forEach(p -> xml.put(p, (String) System.getProperties().remove(p)));
  7. try {
  8. connection.newBuild()
  9. .setStandardError(System.err)
  10. .setStandardOutput(System.out)
  11. .forTasks(task)
  12. .run();
  13. } catch (Exception ex) {
  14. getLogger().debug("Execution of " + task + " resulted in exception", ex);
  15. }
  16. } finally {
  17. // restore jaxp
  18. xml.forEach((k, v) -> {
  19. if (v != null) {
  20. System.setProperty(k, v);
  21. }
  22. });
  23. }
  24. }
  25. }

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

  1. public void apply(Project project) {
  2. project.getPlugins().apply( "java" );
  3. final HibernateExtension hibernateExtension = new HibernateExtension( project );
  4. project.getLogger().debug( "Adding Hibernate extensions to the build [{}]", project.getName() );
  5. project.getExtensions().add( "hibernate", hibernateExtension );
  6. project.afterEvaluate(
  7. new Action<Project>() {
  8. @Override
  9. public void execute(Project project) {
  10. if ( hibernateExtension.enhance != null ) {
  11. applyEnhancement( project, hibernateExtension );
  12. }
  13. }
  14. }
  15. );
  16. }

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

  1. @TaskAction
  2. public void process() throws Throwable {
  3. Project project = getProject();
  4. JoobyProject joobyProject = new JoobyProject(project);
  5. String mainClass = getMainClassName();
  6. try (URLClassLoader loader = joobyProject.newClassLoader()) {
  7. getLogger().debug("Using classloader " + loader);
  8. Path srcdir = project.getProjectDir().toPath();
  9. Path bindir = joobyProject.classes().toPath();
  10. Path output = new ApiParser(srcdir)
  11. .with(loader)
  12. .export(bindir, mainClass);
  13. getLogger().info("API file: " + output);
  14. }
  15. }

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

  1. @Override
  2. public void execute(Task task) {
  3. project.getLogger().debug( "Starting Hibernate enhancement on SourceSet.{}", sourceSet.getName() );

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

  1. project.getLogger().debug( "Applying Hibernate enhancement action to SourceSet.{}", sourceSet.getName() );

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

  1. private void check(Formatter formatter, List<File> outOfDate) throws Exception {
  2. List<File> problemFiles = new ArrayList<>();
  3. for (File file : outOfDate) {
  4. getLogger().debug("Checking format on " + file);
  5. if (!formatter.isClean(file)) {
  6. problemFiles.add(file);
  7. }
  8. }
  9. if (paddedCell) {
  10. PaddedCellGradle.check(this, formatter, problemFiles);
  11. } else {
  12. if (!problemFiles.isEmpty()) {
  13. // if we're not in paddedCell mode, we'll check if maybe we should be
  14. if (PaddedCellBulk.anyMisbehave(formatter, problemFiles)) {
  15. throw PaddedCellGradle.youShouldTurnOnPaddedCell(this);
  16. } else {
  17. throw formatViolationsFor(formatter, problemFiles);
  18. }
  19. }
  20. }
  21. }

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

  1. if (isPaddedCell()) {
  2. for (File file : outOfDate) {
  3. getLogger().debug("Applying format to " + file);
  4. if (PaddedCellBulk.applyAnyChanged(formatter, file)) {
  5. changed.add(file);
  6. boolean anyMisbehave = false;
  7. for (File file : outOfDate) {
  8. getLogger().debug("Applying format to " + file);
  9. String unixResultIfDirty = formatter.applyToAndReturnResultIfDirty(file);
  10. if (unixResultIfDirty != null) {

代码示例来源:origin: gradle.plugin.com.linkedin.pygradle/pygradle-plugin

  1. @Override
  2. public void addSupportedAbi(AbiDetails triple) {
  3. supportedAbis.add(triple);
  4. logger.debug("Available ABI's: {}", supportedAbis);
  5. }

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

  1. @Override
  2. public void onPendingChanges() {
  3. // Only fire once
  4. if (!seenChanges) {
  5. LOGGER.debug("notifying pending changes");
  6. delegate.onPendingChanges();
  7. seenChanges = true;
  8. } else {
  9. LOGGER.debug("already notified");
  10. }
  11. }
  12. }

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

  1. public void abortProcess() {
  2. lock.lock();
  3. try {
  4. aborted = true;
  5. if (process != null) {
  6. LOGGER.debug("Abort requested. Destroying process: {}.", execHandle.getDisplayName());
  7. process.destroy();
  8. }
  9. } finally {
  10. lock.unlock();
  11. }
  12. }

代码示例来源:origin: com.android.tools.build/gradle-core

  1. @Override
  2. public boolean isSatisfiedBy(Task task) {
  3. getLogger().debug("Install task is always run.");
  4. return false;
  5. }
  6. });

代码示例来源:origin: gradle.plugin.com.we.intershop.gradleplugin/icm-code-generator

  1. public void writeFactory(String name, String data) {
  2. logger.debug("writing Factory data : {}", data);
  3. try {
  4. Files.write(this.internalPath.resolve(name), data.getBytes());
  5. } catch (IOException e) {
  6. logger.error("error writing Factory ", e);
  7. }
  8. }

代码示例来源:origin: gradle.plugin.ca.coglinc2/javacc-gradle-plugin

  1. public AbstractJavaccTask setOutputDirectory(File outputDirectory) {
  2. getLogger().debug("Changing output directory to [{}]", outputDirectory);
  3. this.outputDirectory = outputDirectory;
  4. return this;
  5. }

代码示例来源:origin: gradle.plugin.org.hibernate.build/database-profile-plugin

  1. void injectSelectedProfile(Profile selectedProfile) {
  2. if ( this.profile != null ) {
  3. // error? for now, just log it
  4. project.getLogger().debug( "replacing selected Profile : %s -> %s", profile, selectedProfile );
  5. }
  6. this.resolved = true;
  7. this.profile = selectedProfile;
  8. }

代码示例来源:origin: gradle.plugin.org.hibernate.build.gradle/hibernate-matrix-testing

  1. private DatabaseProfile findDatabaseProfile(File directory) {
  2. final File matrixDotGradleFile = new File( directory, MATRIX_BUILD_FILE );
  3. if ( matrixDotGradleFile.exists() && matrixDotGradleFile.isFile() ) {
  4. project.getLogger().debug( "Found matrix.gradle file : " + matrixDotGradleFile );
  5. return new MatrixDotGradleProfile( matrixDotGradleFile, project );
  6. }
  7. final File jdbcDirectory = new File( directory, JDBC_DIR );
  8. if ( jdbcDirectory.exists() && jdbcDirectory.isDirectory() ) {
  9. return new JdbcDirectoryProfile( jdbcDirectory, project );
  10. }
  11. return null;
  12. }

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

  1. public String serialize(ProjectContributorsSet contributorsSet) {
  2. Collection<ProjectContributor> allContributors = contributorsSet.getAllContributors();
  3. String json = Jsoner.serialize(allContributors);
  4. LOG.debug("Serialize contributors to: {}", json);
  5. return json;
  6. }

代码示例来源:origin: gradle.plugin.com.s390x/gogradle

  1. private FileVisitResult visitRepoRoot(String packagePath, Path currentPath) {
  2. LOGGER.debug("Produce recognized package {}.", packagePath);
  3. dependencies.add(createDependency(packagePath, currentPath));
  4. return FileVisitResult.SKIP_SUBTREE;
  5. }

相关文章