EMMA Coverage Report (generated Tue Feb 12 22:23:49 ICT 2008)
[all classes][net.sourceforge.hiveutils.service.impl]

COVERAGE SUMMARY FOR SOURCE FILE [LogWrapper.java]

nameclass, %method, %block, %line, %
LogWrapper.java0%   (0/2)0%   (0/4)0%   (0/107)0%   (0/24)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class LogWrapper0%   (0/1)0%   (0/3)0%   (0/67)0%   (0/24)
LogWrapper (Log, LoggingLevel): void 0%   (0/1)0%   (0/9)0%   (0/4)
debug (Object): void 0%   (0/1)0%   (0/27)0%   (0/10)
debug (Object, Throwable): void 0%   (0/1)0%   (0/31)0%   (0/10)
     
class LogWrapper$10%   (0/1)0%   (0/1)0%   (0/40)0%   (0/1)
<static initializer> 0%   (0/1)0%   (0/40)0%   (0/1)

1//  Copyright 2004-2007 Jean-Francois Poilpret
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14 
15package net.sourceforge.hiveutils.service.impl;
16 
17import org.apache.commons.logging.Log;
18import org.apache.commons.logging.impl.NoOpLog;
19 
20public class LogWrapper extends NoOpLog
21{
22        public LogWrapper(Log logger, LoggingLevel level)
23        {
24                _logger = logger;
25                _level = level;
26        }
27        
28        public void        debug(Object message)
29        {
30                switch (_level)
31                {
32                        case Error:
33                        _logger.error(message);
34                        break;
35                        
36                        case Warn:
37                        _logger.warn(message);
38                        break;
39                        
40                        case Info:
41                        _logger.info(message);
42                        break;
43                        
44                        case Debug:
45                        _logger.debug(message);
46                        break;
47 
48                        case None:
49                        default:
50                        break;
51                }
52        }
53        
54        public void        debug(Object message, Throwable t)
55        {
56                switch (_level)
57                {
58                        case Error:
59                        _logger.error(message, t);
60                        break;
61                        
62                        case Warn:
63                        _logger.warn(message, t);
64                        break;
65                        
66                        case Info:
67                        _logger.info(message, t);
68                        break;
69                        
70                        case Debug:
71                        _logger.debug(message, t);
72                        break;
73 
74                        case None:
75                        default:
76                        break;
77                }
78        }
79        
80        final private Log                        _logger;
81        final private LoggingLevel        _level;
82}

[all classes][net.sourceforge.hiveutils.service.impl]
EMMA 2.0.5312 (C) Vladimir Roubtsov