Re: svn commit: r980657 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r980657 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java

Jacques Le Roux
Administrator
Thanks Adrian!

Jacques

From: <[hidden email]>

> Author: adrianc
> Date: Fri Jul 30 06:26:35 2010
> New Revision: 980657
>
> URL: http://svn.apache.org/viewvc?rev=980657&view=rev
> Log:
> Log element in simple method now prints source file line number.
>
> Modified:
>    ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
>
> Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java?rev=980657&r1=980656&r2=980657&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java (original)
> +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java Fri Jul 30 06:26:35 2010
> @@ -44,12 +44,14 @@ public class Log extends MethodOperation
>
>     String levelStr;
>     String message;
> +    Object startLine;
>     List<MethodString> methodStrings = null;
>
>     public Log(Element element, SimpleMethod simpleMethod) {
>         super(element, simpleMethod);
>         this.message = element.getAttribute("message");
>         this.levelStr = element.getAttribute("level");
> +        this.startLine = element.getUserData("startLine");
>
>         List<? extends Element> methodStringElements = UtilXml.childElementList(element);
>         if (methodStringElements.size() > 0) {
> @@ -97,6 +99,10 @@ public class Log extends MethodOperation
>         buf.append(methodLocation);
>         buf.append("#");
>         buf.append(this.simpleMethod.getMethodName());
> +        if (this.startLine != null) {
> +            buf.append(" line ");
> +            buf.append(this.startLine);
> +        }
>         buf.append("] ");
>
>         if (message != null) buf.append(message);
>
>


Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r980657 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java

Adrian Crum-2
Thank Adam - he did all the hard work. I just exposed the line numbers he tucked away a while ago.

-Adrian

--- On Fri, 7/30/10, Jacques Le Roux <[hidden email]> wrote:

> From: Jacques Le Roux <[hidden email]>
> Subject: Re: svn commit: r980657 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
> To: [hidden email]
> Date: Friday, July 30, 2010, 12:11 AM
> Thanks Adrian!
>
> Jacques
>
> From: <[hidden email]>
> > Author: adrianc
> > Date: Fri Jul 30 06:26:35 2010
> > New Revision: 980657
> >
> > URL: http://svn.apache.org/viewvc?rev=980657&view=rev
> > Log:
> > Log element in simple method now prints source file
> line number.
> >
> > Modified:
> >   
> ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
> >
> > Modified:
> ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
> > URL:
> > http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java?rev=980657&r1=980656&r2=980657&view=diff
> >
> ==============================================================================
> > ---
> ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
> (original)
> > +++
> ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
> Fri Jul 30 06:26:35 2010
> > @@ -44,12 +44,14 @@ public class Log extends
> MethodOperation
> >
> >     String levelStr;
> >     String message;
> > +    Object startLine;
> >     List<MethodString>
> methodStrings = null;
> >
> >     public Log(Element element,
> SimpleMethod simpleMethod) {
> >         super(element,
> simpleMethod);
> >         this.message =
> element.getAttribute("message");
> >         this.levelStr =
> element.getAttribute("level");
> > +        this.startLine =
> element.getUserData("startLine");
> >
> >         List<?
> extends Element> methodStringElements =
> UtilXml.childElementList(element);
> >         if
> (methodStringElements.size() > 0) {
> > @@ -97,6 +99,10 @@ public class Log extends
> MethodOperation
> >     
>    buf.append(methodLocation);
> >     
>    buf.append("#");
> >     
>    buf.append(this.simpleMethod.getMethodName());
> > +        if (this.startLine !=
> null) {
> > +           
> buf.append(" line ");
> > +           
> buf.append(this.startLine);
> > +        }
> >         buf.append("]
> ");
> >
> >         if (message !=
> null) buf.append(message);
> >
> >
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r980657 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java

Jacques Le Roux
Administrator
So thank you Adam (and not only for that!)

Jacques

From: "Adrian Crum" <[hidden email]>

> Thank Adam - he did all the hard work. I just exposed the line numbers he tucked away a while ago.
>
> -Adrian
>
> --- On Fri, 7/30/10, Jacques Le Roux <[hidden email]> wrote:
>
>> From: Jacques Le Roux <[hidden email]>
>> Subject: Re: svn commit: r980657 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
>> To: [hidden email]
>> Date: Friday, July 30, 2010, 12:11 AM
>> Thanks Adrian!
>>
>> Jacques
>>
>> From: <[hidden email]>
>> > Author: adrianc
>> > Date: Fri Jul 30 06:26:35 2010
>> > New Revision: 980657
>> >
>> > URL: http://svn.apache.org/viewvc?rev=980657&view=rev
>> > Log:
>> > Log element in simple method now prints source file
>> line number.
>> >
>> > Modified:
>> >
>> ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
>> >
>> > Modified:
>> ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
>> > URL:
>> > http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java?rev=980657&r1=980656&r2=980657&view=diff
>> >
>> ==============================================================================
>> > ---
>> ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
>> (original)
>> > +++
>> ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Log.java
>> Fri Jul 30 06:26:35 2010
>> > @@ -44,12 +44,14 @@ public class Log extends
>> MethodOperation
>> >
>> > String levelStr;
>> > String message;
>> > + Object startLine;
>> > List<MethodString>
>> methodStrings = null;
>> >
>> > public Log(Element element,
>> SimpleMethod simpleMethod) {
>> > super(element,
>> simpleMethod);
>> > this.message =
>> element.getAttribute("message");
>> > this.levelStr =
>> element.getAttribute("level");
>> > + this.startLine =
>> element.getUserData("startLine");
>> >
>> > List<?
>> extends Element> methodStringElements =
>> UtilXml.childElementList(element);
>> > if
>> (methodStringElements.size() > 0) {
>> > @@ -97,6 +99,10 @@ public class Log extends
>> MethodOperation
>> >
>> buf.append(methodLocation);
>> >
>> buf.append("#");
>> >
>> buf.append(this.simpleMethod.getMethodName());
>> > + if (this.startLine !=
>> null) {
>> > +
>> buf.append(" line ");
>> > +
>> buf.append(this.startLine);
>> > + }
>> > buf.append("]
>> ");
>> >
>> > if (message !=
>> null) buf.append(message);
>> >
>> >
>>
>>
>>
>
>
>
>