buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/XMLLogCountTask.java
equal
deleted
inserted
replaced
19 |
19 |
20 import java.io.File; |
20 import java.io.File; |
21 |
21 |
22 import org.apache.tools.ant.BuildException; |
22 import org.apache.tools.ant.BuildException; |
23 import org.apache.tools.ant.Task; |
23 import org.apache.tools.ant.Task; |
|
24 |
24 import com.nokia.helium.core.ant.conditions.XMLLogCondition; |
25 import com.nokia.helium.core.ant.conditions.XMLLogCondition; |
25 |
26 |
26 /** |
27 /** |
27 * This class sets a property to the number of matching severity inside a XML log. |
28 * This class sets a property to the number of matching severity inside a XML log. |
28 * |
29 * |
76 /** |
77 /** |
77 * Execute the task. Set the property with number of severities. |
78 * Execute the task. Set the property with number of severities. |
78 * @throws BuildException |
79 * @throws BuildException |
79 */ |
80 */ |
80 public void execute() { |
81 public void execute() { |
81 if (property == null) |
82 if (property == null) { |
82 throw new BuildException("'property' attribute is not defined"); |
83 throw new BuildException("'property' attribute is not defined"); |
|
84 } |
83 |
85 |
84 XMLLogCondition cond = new XMLLogCondition(); |
86 XMLLogCondition cond = new XMLLogCondition(); |
85 cond.setFile(fileName); |
87 cond.setFile(fileName); |
86 cond.setLogMatcher(logRegexp); |
88 cond.setLogMatcher(logRegexp); |
87 cond.setSeverity(severity); |
89 cond.setSeverity(severity); |