11
11
import org .apache .commons .cli .*;
12
12
13
13
import javax .lang .model .SourceVersion ;
14
+ import javax .tools .Diagnostic ;
14
15
import javax .xml .transform .stream .StreamSource ;
15
16
import java .io .*;
16
17
import java .nio .charset .Charset ;
@@ -194,7 +195,7 @@ public void save(final CommandLine commandLine, final Root root) {
194
195
bufferedOutputStream .flush ();
195
196
fileOutputStream .flush ();
196
197
197
- LOGGER . info ( "Wrote XML to: " + xmlFile .getAbsolutePath ());
198
+ reporter . print ( Diagnostic . Kind . NOTE , "Wrote XML to: " + xmlFile .getAbsolutePath ());
198
199
199
200
final var parameters = new HashMap <String , String >();
200
201
for (final var option : commandLine .getOptions ()) {
@@ -212,7 +213,7 @@ public void save(final CommandLine commandLine, final Root root) {
212
213
} catch (Exception ex ) {
213
214
LOGGER .log (Level .SEVERE , "Failed to write Restructured Text" , ex );
214
215
}
215
- LOGGER . info ( "Wrote Restructured Text to: " + outFile .getAbsolutePath ());
216
+ reporter . print ( Diagnostic . Kind . NOTE , "Wrote Restructured Text to: " + outFile .getAbsolutePath ());
216
217
}
217
218
218
219
if (commandLine .hasOption ("md" )) {
@@ -222,15 +223,15 @@ public void save(final CommandLine commandLine, final Root root) {
222
223
} catch (Exception ex ) {
223
224
LOGGER .log (Level .SEVERE , "Failed to write Markdown" , ex );
224
225
}
225
- LOGGER . info ( "Wrote Markdown to: " + outFile .getAbsolutePath ());
226
+ reporter . print ( Diagnostic . Kind . NOTE , "Wrote Markdown to: " + outFile .getAbsolutePath ());
226
227
}
227
228
228
229
if (commandLine .hasOption ("docbook" )) {
229
- LOGGER . info ( "Docbook transformation is not supported yet." );
230
+ reporter . print ( Diagnostic . Kind . WARNING , "Docbook transformation is not supported yet." );
230
231
}
231
232
232
233
if (commandLine .hasOption ("adoc" )) {
233
- LOGGER . info ( "ASCII Doctor transformation is not supported yet." );
234
+ reporter . print ( Diagnostic . Kind . WARNING , "ASCII transformation is not supported yet." );
234
235
}
235
236
} catch (RuntimeException | IOException | JAXBException e ) {
236
237
LOGGER .log (Level .SEVERE , "Failed to write the XML File" , e );
0 commit comments