KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > logging > JavaUtilLogger


1 /*
2  * Copyright 2003, 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15
16  */

17 package org.apache.ws.jaxme.logging;
18
19 import java.util.logging.Level JavaDoc;
20
21
22 /**
23  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
24  */

25 public class JavaUtilLogger implements Logger {
26    private final java.util.logging.Logger JavaDoc myLogger;
27    private final String JavaDoc cName;
28
29    public JavaUtilLogger(String JavaDoc pCName) {
30       cName = pCName;
31       myLogger = java.util.logging.Logger.getLogger(cName);
32    }
33
34    public void entering(String JavaDoc mName, Object JavaDoc[] pDetails) {
35       myLogger.entering(cName, mName, pDetails);
36    }
37
38    public void entering(String JavaDoc mName) {
39       myLogger.entering(cName, mName);
40    }
41
42    public void entering(String JavaDoc mName, Object JavaDoc pDetails) {
43       myLogger.entering(cName, mName, pDetails);
44    }
45
46    public void exiting(String JavaDoc mName, Object JavaDoc[] pDetails) {
47       myLogger.exiting(cName, mName, pDetails);
48    }
49
50    public void exiting(String JavaDoc mName) {
51       myLogger.exiting(cName, mName);
52    }
53
54    public void exiting(String JavaDoc mName, Object JavaDoc pDetails) {
55       myLogger.exiting(cName, mName, pDetails);
56    }
57
58    public void throwing(String JavaDoc mName, Throwable JavaDoc t) {
59       myLogger.throwing(cName, mName, t);
60    }
61
62    public void finest(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc[] pDetails) {
63       myLogger.logp(Level.FINEST, cName, mName, pMsg, pDetails);
64    }
65
66    public void finest(String JavaDoc mName, String JavaDoc pMsg) {
67       myLogger.logp(Level.FINEST, cName, mName, pMsg);
68    }
69
70    public void finest(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc pDetails) {
71       myLogger.logp(Level.FINEST, cName, mName, pMsg, pDetails);
72    }
73
74    public void finer(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc[] pDetails) {
75       myLogger.logp(Level.FINER, cName, mName, pMsg, pDetails);
76    }
77
78    public void finer(String JavaDoc mName, String JavaDoc pMsg) {
79       myLogger.logp(Level.FINER, cName, mName, pMsg);
80    }
81
82    public void finer(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc pDetails) {
83       myLogger.logp(Level.FINER, cName, mName, pMsg, pDetails);
84    }
85
86    public void fine(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc[] pDetails) {
87       myLogger.logp(Level.FINE, cName, mName, pMsg, pDetails);
88    }
89
90    public void fine(String JavaDoc mName, String JavaDoc pMsg) {
91       myLogger.logp(Level.FINE, cName, mName, pMsg);
92    }
93
94    public void fine(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc pDetails) {
95       myLogger.logp(Level.FINE, cName, mName, pMsg, pDetails);
96    }
97
98    public void info(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc[] pDetails) {
99       myLogger.logp(Level.INFO, cName, mName, pMsg, pDetails);
100    }
101
102    public void info(String JavaDoc mName, String JavaDoc pMsg) {
103       myLogger.logp(Level.INFO, cName, mName, pMsg);
104    }
105
106    public void info(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc pDetails) {
107       myLogger.logp(Level.INFO, cName, mName, pMsg, pDetails);
108    }
109
110    public void warn(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc[] pDetails) {
111       myLogger.logp(Level.WARNING, cName, mName, pMsg, pDetails);
112    }
113
114    public void warn(String JavaDoc mName, String JavaDoc pMsg) {
115       myLogger.logp(Level.WARNING, cName, mName, pMsg);
116    }
117
118    public void warn(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc pDetails) {
119       myLogger.logp(Level.WARNING, cName, mName, pMsg, pDetails);
120    }
121
122    public void error(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc[] pDetails) {
123       myLogger.logp(Level.SEVERE, cName, mName, pMsg, pDetails);
124    }
125
126    public void error(String JavaDoc mName, String JavaDoc pMsg) {
127       myLogger.logp(Level.SEVERE, cName, mName, pMsg);
128    }
129
130    public void error(String JavaDoc mName, String JavaDoc pMsg, Object JavaDoc pDetails) {
131       myLogger.logp(Level.SEVERE, cName, mName, pMsg, pDetails);
132    }
133
134     public boolean isFinestEnabled() {
135       return myLogger.isLoggable(Level.FINEST);
136     }
137
138     public boolean isFinerEnabled() {
139       return myLogger.isLoggable(Level.FINER);
140     }
141
142     public boolean isFineEnabled() {
143       return myLogger.isLoggable(Level.FINE);
144     }
145
146     public boolean isInfoEnabled() {
147       return myLogger.isLoggable(Level.INFO);
148     }
149
150     public boolean isWarnEnabled() {
151       return myLogger.isLoggable(Level.WARNING);
152     }
153
154     public boolean isErrorEnabled() {
155       return myLogger.isLoggable(Level.SEVERE);
156     }
157 }
158
Popular Tags