View Javadoc

1   /*
2   
3   This software is OSI Certified Open Source Software.
4   OSI Certified is a certification mark of the Open Source Initiative.
5   
6   The license (Mozilla version 1.0) can be read at the MMBase site.
7   See http://www.MMBase.org/license
8   
9   */
10  package net.sf.mmapps.commons.logging.impl;
11  
12  import org.mmbase.util.logging.Logger;
13  
14  /***
15   * Adaptor class to convert jakarta-commons Log calls to MMBase 1.8 Logger calls.<br/>
16   * <br/> 
17   * This class extends {@link net.sf.mmapps.commons.logging.impl.MMBase17Logger} to override
18   * the methods that contain a Throwable as second argument since MMBase 1.8 supports those methods
19   * 
20   * @author Kees Jongenburger
21   */
22  public class MMBase18Logger extends MMBase17Logger {
23  	
24  	/***
25  	 * creates a new adaptor 
26  	 * @param logger the logger to use
27  	 */
28  	MMBase18Logger(Logger logger) {
29  		super(logger);
30  	}
31  
32  	/***
33  	 * calls {@link org.mmbase.util.logging.Logger#debug(java.lang.Object, java.lang.Throwable)}
34  	 */
35  	public void debug(Object object, Throwable throwable) {
36  		logger.debug(object, throwable);
37  	}
38  
39  	/***
40  	 * calls {@link org.mmbase.util.logging.Logger#error(java.lang.Object, java.lang.Throwable)}
41  	 */
42  	public void error(Object object, Throwable throwable) {
43  		logger.error(object, throwable);
44  	}
45  	
46  	/***
47  	 * calls {@link org.mmbase.util.logging.Logger#fatal(java.lang.Object, java.lang.Throwable)}
48  	 */
49  	public void fatal(Object object, Throwable throwable) {
50  		logger.fatal(object, throwable);
51  	}
52  
53  	/***
54  	 * calls {@link org.mmbase.util.logging.Logger#info(java.lang.Object, java.lang.Throwable)}
55  	 */
56  	public void info(Object object, Throwable throwable) {
57  		logger.info(object, throwable);
58  	}
59  
60  	/***
61  	 * calls {@link org.mmbase.util.logging.Logger#trace(java.lang.Object, java.lang.Throwable)}
62  	 */
63  	public void trace(Object object, Throwable throwable) {
64  		logger.trace(object, throwable);
65  	}
66  	
67  	/***
68  	 * calls {@link org.mmbase.util.logging.Logger#warn(java.lang.Object, java.lang.Throwable)}
69  	 */
70  	public void warn(Object object, Throwable throwable) {
71  		logger.warn(object, throwable);
72  	}
73  
74  }