Author: adrianc
Date: Fri Jul 30 06:26:35 2010
New Revision: 980657
URL:
http://svn.apache.org/viewvc?rev=980657&view=revLog:
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);