Open perlun opened 2 years ago
You're getting these INFO messages because the Gradle plugin is running AsciidoctorJ in verbose mode. This should not be the default. There is a reason the messages says "possible". It's because it's a diagnostic message. So I think the Gradle plugin should be changed to only enable verbose mode upon request.
(Once these INFO messages are turned off, you should not be ignoring the remaining warnings and errors from Asciidoctor).
The log level is controlled by the logLevel property on the AsciidoctorJ base plugin. See https://asciidoctor.github.io/asciidoctor-gradle-plugin/development-3.x/user-guide/#_asciidoctorj_base_plugin. It seems like it is tied to the Gradle log level by default, which must be "info". I stand behind my statement that this is not the right default. It should be "warn". But you can change it by using this property.
Thanks for a fast reply. :bow: project.logger.level
as referred to in those docs doesn't seem to exist for me (Gradle 7.2) but project.logger.context.level
is set to LIFECYCLE
- right between INFO
and WARN
in the enum definition:
package org.gradle.api.logging;
public enum LogLevel {
DEBUG,
INFO,
LIFECYCLE,
WARN,
QUIET,
ERROR;
private LogLevel() {
}
}
Anyway: I tried this approach now with no apparent success:
asciidoctorj {
modules {
diagram.use()
diagram.version "${asciidoctorJDiagramVersion}"
}
// Tested with both WARN and QUIET
logLevel LogLevel.WARN
}
(I tried to also set it to info
and warn
as strings at first, and it didn't give me any errors but just seemed to silently ignore the setting.)
Here's the exact JVM command line for the Asciidoctor invocation which Gradle prints if I give it the --info
flag, if it is of any help:
> Task :webapps-hbx:asciidoctor
Caching disabled for task ':webapps-hbx:asciidoctor' because:
Build cache is disabled
Task ':webapps-hbx:asciidoctor' is not up-to-date because:
Executed with '--rerun-tasks'.
Watching 186 directories to track changes
Watching 163 directories to track changes
Copy resources for 'html5' to /home/per/git/hiboxcentre/webapps/hbx/build/asciidoc/html5
Copy resources for 'docbook' to /home/per/git/hiboxcentre/webapps/hbx/build/asciidoc/docbook
Running AsciidoctorJ instance with classpath [/home/per/.gradle/caches/jars-9/6308bf1b67c311e6d7d1696431d58334/asciidoctor-gradle-jvm-3.3.2.jar, /home/per/.gradle/wrapper/dists/gradle-7.2-bin/2dnblmf4td7x66yl1d74lt32g/gradle-7.2/lib/groovy-3.0.8.jar, /home/per/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj/2.4.1/37e4d975e2479bd03a348e3d9c77a89fa510f0bb/asciidoctorj-2.4.1.jar, /home/per/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-diagram/2.0.1/fcc21a110fb0dbbed7baf46fce71cef3c5e9b17b/asciidoctorj-diagram-2.0.1.jar, /home/per/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/9.2.13.0/1e6de00e7bea5ff3c9d6086fd9e2610258c051ce/jruby-complete-9.2.13.0.jar, /home/per/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-api/2.4.1/6cd3abc3bff2d32a7ede570ddb950b42c404465e/asciidoctorj-api-2.4.1.jar, /home/per/.gradle/caches/modules-2/files-2.1/com.beust/jcommander/1.72/6375e521c1e11d6563d4f25a07ce124ccf8cd171/jcommander-1.72.jar, /home/per/.gradle/wrapper/dists/gradle-7.2-bin/2dnblmf4td7x66yl1d74lt32g/gradle-7.2/lib/guava-30.1.1-jre.jar]
Starting process 'command '/usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/java''. Working directory: /home/per/git/hiboxcentre/webapps/hbx Command: /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/java -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/per/.gradle/caches/jars-9/6308bf1b67c311e6d7d1696431d58334/asciidoctor-gradle-jvm-3.3.2.jar:/home/per/.gradle/wrapper/dists/gradle-7.2-bin/2dnblmf4td7x66yl1d74lt32g/gradle-7.2/lib/groovy-3.0.8.jar:/home/per/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj/2.4.1/37e4d975e2479bd03a348e3d9c77a89fa510f0bb/asciidoctorj-2.4.1.jar:/home/per/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-diagram/2.0.1/fcc21a110fb0dbbed7baf46fce71cef3c5e9b17b/asciidoctorj-diagram-2.0.1.jar:/home/per/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/9.2.13.0/1e6de00e7bea5ff3c9d6086fd9e2610258c051ce/jruby-complete-9.2.13.0.jar:/home/per/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-api/2.4.1/6cd3abc3bff2d32a7ede570ddb950b42c404465e/asciidoctorj-api-2.4.1.jar:/home/per/.gradle/caches/modules-2/files-2.1/com.beust/jcommander/1.72/6375e521c1e11d6563d4f25a07ce124ccf8cd171/jcommander-1.72.jar:/home/per/.gradle/wrapper/dists/gradle-7.2-bin/2dnblmf4td7x66yl1d74lt32g/gradle-7.2/lib/guava-30.1.1-jre.jar org.asciidoctor.gradle.remote.AsciidoctorJavaExec /home/per/git/hiboxcentre/webapps/hbx/build/tmp/asciidoctor.javaexec-data
Successfully started process 'command '/usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/java''
Nov 18, 2021 5:14:45 PM uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/substitutors.rb sub_macros
INFO: possible invalid reference: HTTPS
Nov 18, 2021 5:14:45 PM uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/substitutors.rb sub_macros
INFO: possible invalid reference: JSON
Nov 18, 2021 5:14:45 PM uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/substitutors.rb sub_macros
INFO: possible invalid reference: xrtv_media-types
Nov 18, 2021 5:14:45 PM uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/converter/html5.rb convert_section
INFO: possible invalid reference: create-form
Nov 18, 2021 5:14:45 PM uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/converter/html5.rb convert_section
[...]
@mojavelinux Any ideas why the above doesn't work in my use case? :thinking:
I can only comment on how Asciidoctor works. You'll have to direct your question to the plugin's maintainers for how it works in the plugin's environment.
Thanks. :+1: @ysb33r @aalmiray any ideas?
I get the same issue. Any news on how to fix that ?
There is a PR in progress. Will be released as part of 4.0.
Get BlueMail for Android
On 10 Aug 2022, 15:45, at 15:45, Christophe @.***> wrote:
I get the same issue. Any news on how to fix that ?
-- Reply to this email directly or view it on GitHub: https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/631#issuecomment-1210697360 You are receiving this because you were mentioned.
Message ID: @.***>
Good news, is there a planned date for this release ?
As soon as I can get one bug sorted, we'll roll a release. September time-frame, before Gradle 8.0 goes out of the door.
Please try 4.0.0-alpha.1 and tell me if the problem still exists
Hi,
When executing a Gradle task using this plugin, we currently get quite a significant amount of log info/warning messages (see below) These tend to pollute the overall Gradle output (especially when executed in CI jobs), so I'm looking for a way to silence these.
The way we currently run the plugin is like this (simplified example):
I attempted to fix this by adding
quiet: 'true
to theoptions
above, but it didn't make any change. This seems to be the way to do it with theasciidoctor
CLI, but perhaps the syntax is slightly different with the Gradle plugin? :thinking:Example of log messages that should be silenced