KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ofbiz > shark > logging > DebugLoggingManager


1 /*
2  * $Id: DebugLoggingManager.java 5462 2005-08-05 18:35:48Z jonesde $
3  *
4  * Copyright (c) 2004 The Open For Business Project - www.ofbiz.org
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the "Software"),
8  * to deal in the Software without restriction, including without limitation
9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the
11  * Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included
14  * in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
21  * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
22  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  *
24  */

25 package org.ofbiz.shark.logging;
26
27 import org.ofbiz.base.util.Debug;
28
29 import org.enhydra.shark.api.internal.logging.LoggingManager;
30 import org.enhydra.shark.api.internal.working.CallbackUtilities;
31 import org.enhydra.shark.api.RootException;
32
33 /**
34  *
35  * @author <a HREF="mailto:jaz@ofbiz.org">Andy Zeneski</a>
36  * @version $Rev: 5462 $
37  * @since 3.1
38  */

39 public class DebugLoggingManager implements LoggingManager {
40
41     public static final String JavaDoc module = DebugLoggingManager.class.getName();
42     protected CallbackUtilities cus = null;
43
44     public void configure(CallbackUtilities cus) throws RootException {
45         this.cus = cus;
46     }
47
48     public void error(String JavaDoc msg) throws RootException {
49         Debug.logError(msg, module);
50     }
51
52     public void error(String JavaDoc msg, RootException ex) throws RootException {
53         Debug.logError(ex, msg, module);
54     }
55
56     public void error(String JavaDoc channel, String JavaDoc msg) throws RootException {
57         Debug.logError(msg, channel);
58     }
59
60     public void error(String JavaDoc channel, String JavaDoc msg, RootException ex) throws RootException {
61         Debug.logError(ex, msg, channel);
62     }
63
64     public void warn(String JavaDoc msg) throws RootException {
65         Debug.logWarning(msg, module);
66     }
67
68     public void warn(String JavaDoc msg, RootException ex) throws RootException {
69         Debug.logWarning(ex, msg, module);
70     }
71
72     public void warn(String JavaDoc channel, String JavaDoc msg) throws RootException {
73         Debug.logWarning(msg, channel);
74     }
75
76     public void warn(String JavaDoc channel, String JavaDoc msg, RootException ex) throws RootException {
77         Debug.logWarning(ex, msg, channel);
78     }
79
80     public void info(String JavaDoc msg) throws RootException {
81         Debug.logInfo(msg, module);
82     }
83
84     public void info(String JavaDoc msg, RootException ex) throws RootException {
85         Debug.logInfo(ex, msg, module);
86     }
87
88     public void info(String JavaDoc channel, String JavaDoc msg) throws RootException {
89         Debug.logInfo(msg, channel);
90     }
91
92     public void info(String JavaDoc channel, String JavaDoc msg, RootException ex) throws RootException {
93         Debug.logInfo(ex, msg, channel);
94     }
95
96     public void debug(String JavaDoc msg) throws RootException {
97         Debug.logVerbose(msg, module);
98     }
99
100     public void debug(String JavaDoc msg, RootException ex) throws RootException {
101         Debug.logVerbose(ex, msg, module);
102     }
103
104     public void debug(String JavaDoc channel, String JavaDoc msg) throws RootException {
105         Debug.logVerbose(msg, channel);
106     }
107
108     public void debug(String JavaDoc channel, String JavaDoc msg, RootException ex) throws RootException {
109         Debug.logVerbose(ex, msg, channel);
110     }
111 }
112
Popular Tags