[oXygen-user] Evaluate console output

Oxygen XML Editor Support support at oxygenxml.com
Tue Sep 24 02:41:26 CDT 2013


Hi Richard,

The parameter I suggested you add to the ANT scenarios:

"-logger org.dita.dost.log.DITAOTBuildLogger"

sets as a logger an implementation class called 
"org.dita.dost.log.DITAOTBuildLogger" (you can get the Java sources for 
it from the DITA OT Git Hub project).
You could set your own custom Java logger implementation there.

About this remark:

> As for the errors to catch, we would like to see the following kind of error caught by Oxygen as well, not just [DOT*]:

I'll add an improvement request for this.

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 9/23/2013 8:11 PM, Richard Forster wrote:
> Dear Radu
>
> Many thanks.  The capturing the log info in a file like indicated is very helpful.
>
> I did not manage to implement the second part of your recommendation - even with the custom build approach it seems like the log file is only written after all the steps are executed, so I don't have a way of evaluating it.
>
> My transformation log in Oxygen e.g. ends as follows:
>
>> BUILD FAILED
>
>> Number of Fatals : 0
>> Number of Errors : 1
>> Number of Warnings : 145
>
>> Total time: 10 seconds
>> Log file 'abc_pdf2.log' was generated successfully in directory >'C:\... out/pdf'.
>
>> The process finished with exit code: 0
>
>
> As for the errors to catch, we would like to see the following kind of error caught by Oxygen as well, not just [DOT*]:
>
> [PDFJ001E][ERROR] Index entry 'çenesi' is dropped, because corresponding group is not found.
>
>
> Best
> Richard
>
> -----Original Message-----
> From: oxygen-user-bounces at oxygenxml.com [mailto:oxygen-user-bounces at oxygenxml.com] On Behalf Of Oxygen XML Editor Support
> Sent: Friday, September 20, 2013 08:26
> To: oxygen-user at oxygenxml.com
> Subject: Re: [oXygen-user] Evaluate console output
>
> Hi Richard,
>
> You are publishing DITA content, right? What version of Oxygen are you using?
>
> In Oxygen 15.0 the console output when running DITA transformations does not appear by default (there is a setting for this in each transformation scenario). So by default it appears only when the PDF output fails indicating a severe problem.
>
> More answers below:
>
>> a) to save the transformation log to disk
>
> This can be done. I followed the steps in:
>
> http://dita-ot.sourceforge.net/1.5.2/quickstartguide/tasks/using_DITAOTBuildLogger.html
>
> I edited the transformation scenario and in the "Advanced" tab in the "Build Target" field I set the value:
>
> -logger org.dita.dost.log.DITAOTBuildLogger
>
> In the output folder I found a "myDitaMapName.log" file after the transformation containing the output.
>
>> b) to evaluate it with certain rules?
>> For instance, it would be great if after a PDF transformation we could implement an automated brief check of the log file for occurrences of the string "[ERROR]" or also some pattern for certain warnings. If that string is found in the log file, initiate some action, e.g. renaming the output PDF (e.g. by appending "_errors_in_log" to the file name).
>
> Actually we already do this in Oxygen, while the transformation is in progress some console lines trigger custom errors to be shown to the user in a separate "Transformation Problems" tab.
> Right now Oxygen looks for error lines which begin with "[DOT" which means the DITA OT code reported an error or with "[fop] [ERROR]" which means Apache FOP had some problems creating the PDF. But of course this could and probably will be perfected, to look for errors reported by the XSLT processing for example.
> But as you can have the log file as outlined in answer to (a) you could have a custom DITA OT build file which launches the standard transformation and then maybe calls a Java method to process the log and report things to the user.
>
> A small topic about how a custom build file could work:
>
> http://www.oxygenxml.com/doc/ug-oxygen/index.html#topics/dita-map-use-your-own-build-file.html
>
> Regards,
> Radu
>
> Radu Coravu
> <oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com
>
> On 9/19/2013 11:35 PM, Richard Forster wrote:
>> Hello Oxygen List
>>
>> The console output (transformation log) is overwhelming for many
>> standard users. They won't know what to look for in the log and tend
>> not to check it at all as soon as some kind of output is generated,
>> thereby overlooking potentially grave omissions in the output.
>>
>> Is there a convenient way
>>
>> a) to save the transformation log to disk
>>
>> b) to evaluate it with certain rules?
>>
>> For instance, it would be great if after a PDF transformation we could
>> implement an automated brief check of the log file for occurrences of
>> the string "[ERROR]" or also some pattern for certain warnings. If
>> that string is found in the log file, initiate some action, e.g.
>> renaming the output PDF (e.g. by appending "_errors_in_log" to the file name).
>>
>> Many thanks in advance for any ideas
>>
>> Richard
>>
>>
>>
>> _______________________________________________
>> oXygen-user mailing list
>> oXygen-user at oxygenxml.com
>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
>


More information about the oXygen-user mailing list