Are there any logging facilities? [message #1740153] |
Tue, 09 August 2016 19:58 |
Shimon Zadok Messages: 24 Registered: May 2016 |
Junior Member |
|
|
Are there any logging facilities, maybe a robust as Python's logging?
If not, has anybody tried something similar like as follows?
Creating a wrapper service for DEBUG logs (printing to stdout).
Like so:
package project.services;
public class Logging {
public void debug(String message) {
System.out.println("DEBUG "+message);
}
}
And adding to the template the usage as so:
[('Operation ' + i +': name=' + aParameter.name + ', direction=' + aParameter.direction + ', CRUD=' + aParameter.effect).debug() /]
I find it annoying to be getting an extra line feed on the generated files.
Using the following to still set debug print on separate line, but without the line feed overhead on the 'text'...
[('Operation ' + i +': name=' + aParameter.name + ', direction=' + aParameter.direction + ', CRUD=' + aParameter.effect).debug() /][ ''
/][next logics]
This is not pretty, but does the job.
Is there a pretty way, while keeping the debug calls on independent lines?
[Updated on: Sat, 13 August 2016 15:36] Report message to a moderator
|
|
|
Re: Are there any logging facilities? [message #1740608 is a reply to message #1740153] |
Tue, 16 August 2016 08:07 |
|
Hi,
You can use a file block with "stdout" as file name to print on the standard output, but we have no specific debug facilities other than that. You can use nested file blocks for that:
[file ('generatedFile.txt', false, 'UTF-8')]
generate this in file
[file ('stdout', false, 'UTF-8')]
this goes only in stdout
[/file]
and this
[/file]
Laurent Goubet
Obeo
|
|
|
|
Powered by
FUDForum. Page generated in 0.02886 seconds