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 |
Administrator
|
+1, sounds useful (if we finally keep minilang...)
Jacques From: "Adrian Crum" <[hidden email]> >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 > |
In reply to this post by Adrian Crum-3
+1, Nice one for debugging in xml.
Regards, Ankit Jain On Mon, May 7, 2012 at 11:21 PM, Adrian Crum <[hidden email]> wrote: > 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 > |
In reply to this post by Adrian Crum-3
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 > -- Nicolas MALIN Consultant Tél : 06.17.66.40.06 Site projet : http://www.neogia.org/ ------- Société LibrenBerry Tél : 02.48.02.56.12 Site : http://www.librenberry.net/ |
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 >> > > |
In reply to this post by Adrian Crum-3
+1
On May 7, 2012, at 7:51 PM, Adrian Crum wrote: > 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 > |
In reply to this post by Adrian Crum-3
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? > +1 -- Erwan de FERRIERES www.nereide.biz |
In reply to this post by Adrian Crum-3
Thanks a lot adrian for this detail. It's a good enhancement for
debugging mini-lang code Nicolas Le 08/05/2012 11:40, Adrian Crum a écrit : > 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 >>> >> >> |
Free forum by Nabble | Edit this page |