No, the <trace> element would not have a message attribute or any means
of specifying what to log. It is only an /on/off switch. All of the
logging details are in the Mini-language Java code.
So, this Mini-language code:
<trace level="info">
<entity-and... />
</trace>
would produce something like:
2012-05-08 ... MyServices.xml, Line 243 <entity-and> element: Performing
find operation on entity "Party" with field Map [partyTypeId="ORGANIZATION"]
2012-05-08 ... MyServices.xml, Line 243 <entity-and> element: Find
operation returned 5 items
or if there was an exception thrown, it would produce something like:
2012-05-08 ... MyServices.xml, Line 243 <entity-and> element: Performing
find operation on entity "Party" with field Map [partyTypeId="ORGANIZATION"]
2012-05-08 ... MyServices.xml, Line 243 <entity-and> element: Exception
thrown during find operation, exception message was "Error: ..."
2012-05-08 ... MyServices.xml, Line 243 <entity-and> element: Throwing
MiniLangRuntimeException
-Adrian
On 5/8/2012 9:33 AM, Nicolas Malin wrote:
Nice idea.
Just to understand the log element can't be extend to support this
functionnality ?
<log level="info">
<entity-and ....>
<message>the list ${listName}</message>
</log>
Or you want adding a new element trace to separate the log message
than strace process ?
nicolas
Le 07/05/2012 19:51, Adrian Crum a écrit :
I am considering adding an element to Mini-language - <trace> - to
aid with development. The element would be used like so:
<trace level="info">
<!-- code that needs debugging goes here -->
</trace>
Each contained element will log detailed information on its internal
state using the specified log level.
A developer trying to debug a block of code can enclose it with the
<trace> element to see what is happening internally.
What do you think?
-Adrian