EMMA Coverage Report (generated Tue Jul 25 14:15:05 CDT 2006)
[all classes][com.mysql.jdbc.log]

COVERAGE SUMMARY FOR SOURCE FILE [Log4JLogger.java]

nameclass, %method, %block, %line, %
Log4JLogger.java0%   (0/1)0%   (0/19)0%   (0/113)0%   (0/33)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Log4JLogger0%   (0/1)0%   (0/19)0%   (0/113)0%   (0/33)
Log4JLogger (String): void 0%   (0/1)0%   (0/7)0%   (0/3)
isDebugEnabled (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
isErrorEnabled (): boolean 0%   (0/1)0%   (0/5)0%   (0/1)
isFatalEnabled (): boolean 0%   (0/1)0%   (0/5)0%   (0/1)
isInfoEnabled (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
isTraceEnabled (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
isWarnEnabled (): boolean 0%   (0/1)0%   (0/5)0%   (0/1)
logDebug (Object): void 0%   (0/1)0%   (0/7)0%   (0/2)
logDebug (Object, Throwable): void 0%   (0/1)0%   (0/7)0%   (0/2)
logError (Object): void 0%   (0/1)0%   (0/6)0%   (0/2)
logError (Object, Throwable): void 0%   (0/1)0%   (0/7)0%   (0/2)
logFatal (Object): void 0%   (0/1)0%   (0/6)0%   (0/2)
logFatal (Object, Throwable): void 0%   (0/1)0%   (0/7)0%   (0/2)
logInfo (Object): void 0%   (0/1)0%   (0/6)0%   (0/2)
logInfo (Object, Throwable): void 0%   (0/1)0%   (0/7)0%   (0/2)
logTrace (Object): void 0%   (0/1)0%   (0/6)0%   (0/2)
logTrace (Object, Throwable): void 0%   (0/1)0%   (0/7)0%   (0/2)
logWarn (Object): void 0%   (0/1)0%   (0/6)0%   (0/2)
logWarn (Object, Throwable): void 0%   (0/1)0%   (0/7)0%   (0/2)

1/*
2 Copyright (C) 2002-2004 MySQL AB
3 
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of version 2 of the GNU General Public License as 
6 published by the Free Software Foundation.
7 
8 There are special exceptions to the terms and conditions of the GPL 
9 as it is applied to this software. View the full text of the 
10 exception in file EXCEPTIONS-CONNECTOR-J in the directory of this 
11 software distribution.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 
22 
23 
24 */
25package com.mysql.jdbc.log;
26 
27import org.apache.log4j.Level;
28import org.apache.log4j.Logger;
29 
30/**
31 * Implementation of log interface for Apache Log4j
32 * 
33 * @author Mark Matthews
34 * 
35 * @version $Id: Log4JLogger.java 3726 2005-05-19 15:52:24Z mmatthews $
36 */
37public class Log4JLogger implements Log {
38 
39        private Logger logger;
40 
41        public Log4JLogger(String instanceName) {
42                this.logger = Logger.getLogger(instanceName);
43        }
44 
45        /*
46         * (non-Javadoc)
47         * 
48         * @see com.mysql.jdbc.log.Log#isDebugEnabled()
49         */
50        public boolean isDebugEnabled() {
51                return this.logger.isDebugEnabled();
52        }
53 
54        /*
55         * (non-Javadoc)
56         * 
57         * @see com.mysql.jdbc.log.Log#isErrorEnabled()
58         */
59        public boolean isErrorEnabled() {
60                return this.logger.isEnabledFor(Level.ERROR);
61        }
62 
63        /*
64         * (non-Javadoc)
65         * 
66         * @see com.mysql.jdbc.log.Log#isFatalEnabled()
67         */
68        public boolean isFatalEnabled() {
69                return this.logger.isEnabledFor(Level.FATAL);
70        }
71 
72        /*
73         * (non-Javadoc)
74         * 
75         * @see com.mysql.jdbc.log.Log#isInfoEnabled()
76         */
77        public boolean isInfoEnabled() {
78                return this.logger.isInfoEnabled();
79        }
80 
81        /*
82         * (non-Javadoc)
83         * 
84         * @see com.mysql.jdbc.log.Log#isTraceEnabled()
85         */
86        public boolean isTraceEnabled() {
87                return this.logger.isDebugEnabled();
88        }
89 
90        /*
91         * (non-Javadoc)
92         * 
93         * @see com.mysql.jdbc.log.Log#isWarnEnabled()
94         */
95        public boolean isWarnEnabled() {
96                return this.logger.isEnabledFor(Level.WARN);
97        }
98 
99        /*
100         * (non-Javadoc)
101         * 
102         * @see com.mysql.jdbc.log.Log#logDebug(java.lang.Object)
103         */
104        public void logDebug(Object msg) {
105                this.logger.debug(LogUtils.expandProfilerEventIfNecessary(LogUtils
106                                .expandProfilerEventIfNecessary(msg)));
107        }
108 
109        /*
110         * (non-Javadoc)
111         * 
112         * @see com.mysql.jdbc.log.Log#logDebug(java.lang.Object,
113         *      java.lang.Throwable)
114         */
115        public void logDebug(Object msg, Throwable thrown) {
116                this.logger.debug(LogUtils.expandProfilerEventIfNecessary(msg), thrown);
117        }
118 
119        /*
120         * (non-Javadoc)
121         * 
122         * @see com.mysql.jdbc.log.Log#logError(java.lang.Object)
123         */
124        public void logError(Object msg) {
125                this.logger.error(LogUtils.expandProfilerEventIfNecessary(msg));
126        }
127 
128        /*
129         * (non-Javadoc)
130         * 
131         * @see com.mysql.jdbc.log.Log#logError(java.lang.Object,
132         *      java.lang.Throwable)
133         */
134        public void logError(Object msg, Throwable thrown) {
135                this.logger.error(LogUtils.expandProfilerEventIfNecessary(msg), thrown);
136        }
137 
138        /*
139         * (non-Javadoc)
140         * 
141         * @see com.mysql.jdbc.log.Log#logFatal(java.lang.Object)
142         */
143        public void logFatal(Object msg) {
144                this.logger.fatal(LogUtils.expandProfilerEventIfNecessary(msg));
145        }
146 
147        /*
148         * (non-Javadoc)
149         * 
150         * @see com.mysql.jdbc.log.Log#logFatal(java.lang.Object,
151         *      java.lang.Throwable)
152         */
153        public void logFatal(Object msg, Throwable thrown) {
154                this.logger.fatal(LogUtils.expandProfilerEventIfNecessary(msg), thrown);
155        }
156 
157        /*
158         * (non-Javadoc)
159         * 
160         * @see com.mysql.jdbc.log.Log#logInfo(java.lang.Object)
161         */
162        public void logInfo(Object msg) {
163                this.logger.info(LogUtils.expandProfilerEventIfNecessary(msg));
164        }
165 
166        /*
167         * (non-Javadoc)
168         * 
169         * @see com.mysql.jdbc.log.Log#logInfo(java.lang.Object,
170         *      java.lang.Throwable)
171         */
172        public void logInfo(Object msg, Throwable thrown) {
173                this.logger.info(LogUtils.expandProfilerEventIfNecessary(msg), thrown);
174        }
175 
176        /*
177         * (non-Javadoc)
178         * 
179         * @see com.mysql.jdbc.log.Log#logTrace(java.lang.Object)
180         */
181        public void logTrace(Object msg) {
182                this.logger.debug(LogUtils.expandProfilerEventIfNecessary(msg));
183        }
184 
185        /*
186         * (non-Javadoc)
187         * 
188         * @see com.mysql.jdbc.log.Log#logTrace(java.lang.Object,
189         *      java.lang.Throwable)
190         */
191        public void logTrace(Object msg, Throwable thrown) {
192                this.logger.debug(LogUtils.expandProfilerEventIfNecessary(msg), thrown);
193        }
194 
195        /*
196         * (non-Javadoc)
197         * 
198         * @see com.mysql.jdbc.log.Log#logWarn(java.lang.Object)
199         */
200        public void logWarn(Object msg) {
201                this.logger.warn(LogUtils.expandProfilerEventIfNecessary(msg));
202        }
203 
204        /*
205         * (non-Javadoc)
206         * 
207         * @see com.mysql.jdbc.log.Log#logWarn(java.lang.Object,
208         *      java.lang.Throwable)
209         */
210        public void logWarn(Object msg, Throwable thrown) {
211                this.logger.warn(LogUtils.expandProfilerEventIfNecessary(msg), thrown);
212        }
213}

[all classes][com.mysql.jdbc.log]
EMMA 2.0.4217 (C) Vladimir Roubtsov