View Javadoc
1   package eu.simuline.m2latex.mojo;
2   
3   import eu.simuline.m2latex.core.LogWrapper;
4   
5   import org.slf4j.Logger;
6   import org.slf4j.LoggerFactory;
7   
8   /**
9    * Performs logging in a maven plugin. 
10   *
11   *
12   * Created: Fri Oct  7 00:40:27 2016
13   *
14   * @author <a href="mailto:rei3ner@arcor.de">Ernst Reissner</a>
15   * @version 1.0
16   */
17  public class MavenLogWrapper implements LogWrapper {
18  
19    private final Logger log;
20  
21    public MavenLogWrapper(Class<?> cls) {
22      this.log = LoggerFactory.getLogger(cls.getSimpleName());
23    }
24  
25    public void error(String msg) {
26      this.log.error(msg);
27    }
28  
29    public void warn(String msg) {
30      this.log.warn(msg);
31    }
32  
33    public void warn(String msg, Throwable thrw) {
34      this.log.warn(msg, thrw);
35    }
36  
37    public void info(String msg) {
38      this.log.info(msg);
39    }
40    //void verbose(String msg);
41  
42    public void debug(String msg) {
43      this.log.debug(msg);
44    }
45  
46    // public void debug(String msg, Throwable thrw) {
47    // 	this.log.debug(msg, thrw);
48    // }
49  
50  
51  }