KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > jdbc > util > Logger


1 /*
2  * XAPool: Open Source XA JDBC Pool
3  * Copyright (C) 2003 Objectweb.org
4  * Initial Developer: Lutris Technologies Inc.
5  * Contact: xapool-public@lists.debian-sf.objectweb.org
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20  * USA
21  */

22 package org.enhydra.jdbc.util;
23
24 import org.apache.commons.logging.Log;
25
26 import java.io.PrintWriter JavaDoc;
27
28 public class Logger extends PrintWriter JavaDoc{
29     private Log log;
30
31     public Logger(Log log) {
32         super(new PrintWriter JavaDoc(System.err));
33         this.log = log;
34     }
35
36     public void debug(Object JavaDoc o) {
37         log.debug(o);
38     }
39     public void debug(Object JavaDoc o, Throwable JavaDoc t) {
40         log.debug(o,t);
41     }
42     public void info(Object JavaDoc o) {
43         log.info(o);
44     }
45     public void info(Object JavaDoc o, Throwable JavaDoc t) {
46         log.info(o,t);
47     }
48     public void warn(Object JavaDoc o) {
49         log.warn(o);
50     }
51     public void warn(Object JavaDoc o, Throwable JavaDoc t) {
52         log.warn(o,t);
53     }
54     public void error(Object JavaDoc o) {
55         log.error(o);
56     }
57     public void error(Object JavaDoc o, Throwable JavaDoc t) {
58         log.error(o,t);
59     }
60     public void fatal(Object JavaDoc o) {
61         log.fatal(o);
62     }
63     public void fatal(Object JavaDoc o, Throwable JavaDoc t) {
64         log.fatal(o,t);
65     }
66
67 }
68
Popular Tags