View Javadoc
1   package eu.simuline.m2latex.antTask;
2   
3   import eu.simuline.m2latex.core.LogWrapper;
4   
5   import org.apache.tools.ant.Project;
6   
7   /**
8    * Performs logging in an ant task. 
9    *
10   *
11   * Created: Fri Oct  7 00:40:27 2016
12   *
13   * @author <a href="mailto:rei3ner@arcor.de">Ernst Reissner</a>
14   * @version 1.0
15   */
16  public class AntLogWrapper implements LogWrapper {
17  
18    private final Project project;
19  
20    public AntLogWrapper(Project project) {
21      this.project = project;
22    }
23  
24    public void error(String msg) {
25      this.project.log("[error] " + msg, Project.MSG_ERR);
26    }
27  
28    public void warn(String msg) {
29      this.project.log("[warning] " + msg, Project.MSG_WARN);
30    }
31  
32    public void warn(String msg, Throwable thrw) {
33      this.project.log("[warning] " + msg, thrw, Project.MSG_WARN);
34    }
35  
36    public void info(String msg) {
37      this.project.log("[info] " + msg, Project.MSG_INFO);
38    }
39  
40    //void verbose(String msg);
41    public void debug(String msg) {
42      this.project.log("[debug] " + msg, Project.MSG_DEBUG);
43    }
44  
45    // public void debug(String msg, Throwable thrw) {
46    // 	this.project.log(msg, thrw, Project.MSG_DEBUG);
47    // }
48  
49  
50  }