is there any way to display the log messages created with qvto's log() function in the eclipse console when calling the QVTO transformation from within an java class?
All the logging occurs to a org.eclipse.m2m.qvt.oml.util.Log, so make
sure you configure an appropiate logger for your purposes.
Regards
Ed Willink
On 22/03/2013 10:57, Miriam Hundemer wrote:
> Hi,
>
> is there any way to display the log messages created with qvto's log()
> function in the eclipse console when calling the QVTO transformation
> from within an java class?
>
> Thank you,
>
> Miriam
The MessageConsoleStream obtained from the console should be used to create a WriterLog (org.eclipse.m2m.qvt.oml.util.WriterLog). For instance:
Log log = new WriterLog(new OutputStreamWriter(output));
The log is an "org.eclipse.m2m.qvt.oml.util.Log", as Ed pointed out. Then it can be when setting the executing environment details (look for the code section "setup the execution environment details" in http://wiki.eclipse.org/QVTOML/Examples/InvokeInJava). The log can be used simply as:
thanks for your answers and sorry for the newbie question. Once you know how things are supposed to be done they are not quite so complicated than they appear to be at first.
I solved the problem now by simply defining a Logger for my Execution just as Ed suggested.
OutputStreamWriter outStream = new OutputStreamWriter(System.out);
Log log = new WriterLog(outStream);