EMMA Coverage Report (generated Wed Aug 10 12:30:04 EDT 2011)
[all classes][org.jclouds.logging]

COVERAGE SUMMARY FOR SOURCE FILE [NullLogger.java]

nameclass, %method, %block, %line, %
NullLogger.java100% (1/1)43%  (6/14)18%  (9/50)35%  (6/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class NullLogger100% (1/1)43%  (6/14)18%  (9/50)35%  (6/17)
error (String, Object []): void 0%   (0/1)0%   (0/13)0%   (0/2)
error (Throwable, String, Object []): void 0%   (0/1)0%   (0/17)0%   (0/3)
getCategory (): String 0%   (0/1)0%   (0/2)0%   (0/1)
info (String, Object []): void 0%   (0/1)0%   (0/1)0%   (0/1)
isDebugEnabled (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
isErrorEnabled (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
isInfoEnabled (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
isWarnEnabled (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
NullLogger (): void 100% (1/1)100% (3/3)100% (1/1)
debug (String, Object []): void 100% (1/1)100% (1/1)100% (1/1)
isTraceEnabled (): boolean 100% (1/1)100% (2/2)100% (1/1)
trace (String, Object []): void 100% (1/1)100% (1/1)100% (1/1)
warn (String, Object []): void 100% (1/1)100% (1/1)100% (1/1)
warn (Throwable, String, Object []): void 100% (1/1)100% (1/1)100% (1/1)

1/**
2 *
3 * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
4 *
5 * ====================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ====================================================================
18 */
19package org.jclouds.logging;
20 
21import com.google.common.base.Throwables;
22 
23/**
24 * <tt>Logger</tt> that doesn't do anything.
25 * <p />
26 * Useful to get baseline performance unaffected by logging.
27 * 
28 * @author Adrian Cole
29 * 
30 */
31public class NullLogger implements Logger {
32 
33   public void debug(String message, Object... args) {
34 
35   }
36 
37   public void error(String message, Object... args) {
38      System.err.printf(message + "%n", args);
39   }
40 
41   public void error(Throwable throwable, String message, Object... args) {
42      System.err.printf(message, args);
43      System.err.printf("%n%s", Throwables.getStackTraceAsString(throwable));
44   }
45 
46   public String getCategory() {
47 
48      return null;
49   }
50 
51   public void info(String message, Object... args) {
52 
53   }
54 
55   public boolean isDebugEnabled() {
56 
57      return false;
58   }
59 
60   public boolean isErrorEnabled() {
61 
62      return true;
63   }
64 
65   public boolean isInfoEnabled() {
66 
67      return false;
68   }
69 
70   public boolean isTraceEnabled() {
71 
72      return false;
73   }
74 
75   public boolean isWarnEnabled() {
76 
77      return false;
78   }
79 
80   public void trace(String message, Object... args) {
81 
82   }
83 
84   public void warn(String message, Object... args) {
85 
86   }
87 
88   public void warn(Throwable throwable, String message, Object... args) {
89 
90   }
91}

[all classes][org.jclouds.logging]
EMMA 2.0.5312 (C) Vladimir Roubtsov