-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error/warning log handling #323
Comments
It's not the first time we see problems with this. If you see the Doxia module ( asciidoctor-maven-plugin/src/main/java/org/asciidoctor/maven/site/AsciidoctorParser.java Line 64 in 3d44753
Reader object, so we cannot access to the File to log the path it in the same way we do in the default mojo.The only thing I have found is running Maven in debug mode ('-X'), that way you see a
It's not the source but the output, but you can see the filename at least and guess the file. I just checked if there was something new in the Doxia documentation, but found nothing. Maybe there's a way to access the source or some info to log it, but needs further research into Doxia code. |
We will try to address this in related to DOXIA-555 issue. |
With Asciidoctorj 1.5.8.x new messages that include the file path are shown in the console, which partially resolves this issue. However, this is not ideal and creates a difference with the |
I did the preoviously mentioned logHandler integration and I hit again the limitations of the Doxia module (unable to get the filename :%). One thing however, is that if you enable the build to fail Doxia will catch the first file that failed and at least show that. Far from perfect, I know. For those reasons I will keep this open but reschedule for future realease in case something comes up. |
Fix is on the works: apache/maven-doxia#35 |
We are still chasing this, this should make it possible finally apache/maven-doxia-sitetools#19. At least I got it working in a local example overriding |
Doxia improvements are already in v2.2.5 and older versions. |
Reference is still obtained as |
Testing with maven-site-plugin 3.20.0 which comes with Doxia v2 the reference is finally informed 🎉 |
New message Default behavior:
With <logHandler>
<outputToConsole>false</outputToConsole>
</logHandler>
With <logHandler>
<outputToConsole>true</outputToConsole>
<failIf>
<severity>ERROR</severity>
</failIf>
</logHandler>
I wanted to minimize changes, in normal mojo we always print "Converting {file}", so we don't need to do anything special. |
This PR uses the new 'reference' parameter in Doxia Parsers to print the source filename when an issue is detected. This is comparible and extende the features in 'logHandler'. Fixes asciidoctor#323
This PR uses the new 'reference' parameter in Doxia Parsers to print the source filename when an issue is detected. This is compatible and extends the features in 'logHandler'. Fixes asciidoctor#323
This PR uses the new 'reference' parameter in Doxia Parsers to print the source filename when an issue is detected. This is compatible and extends the features in 'logHandler'. Fixes asciidoctor#323
At the moment when I run
mvn clean site site:deploy
I get this in my log:You can see I am rendering 28 documents, and I have errors and warnings in some of them. I can see the line, however I don't know which file is problematic.
The text was updated successfully, but these errors were encountered: