1 28 29 package org.objectweb.openccm.uml.transformation.log; 30 31 import org.apache.commons.logging.Log; 32 33 37 public class LogConsole implements Log { 38 39 private String name; 40 41 44 public LogConsole(String name) { 45 this.name = name; 46 } 47 48 51 public void debug(Object message, Throwable throwable) { 52 ConsoleSingleton.getConsole().message((String )message + " : " + throwable.toString()); 53 54 } 55 56 59 public void debug(Object message) { 60 ConsoleSingleton.getConsole().message((String )message); 61 } 62 63 66 public void error(Object message, Throwable throwable) { 67 ConsoleSingleton.getConsole().error((String )message + " : " + throwable.toString()); 68 } 69 70 73 public void error(Object message) { 74 ConsoleSingleton.getConsole().error((String )message); 75 } 76 77 80 public void fatal(Object message, Throwable throwable) { 81 ConsoleSingleton.getConsole().message((String )message + " : " + throwable.toString()); 82 } 83 84 87 public void fatal(Object message) { 88 ConsoleSingleton.getConsole().message((String )message); 89 } 90 91 94 public void info(Object message, Throwable throwable) { 95 ConsoleSingleton.getConsole().message((String )message + " : " + throwable.toString()); 96 } 97 98 101 public void info(Object message) { 102 ConsoleSingleton.getConsole().message((String )message); 103 } 104 105 108 public void trace(Object message, Throwable throwable) { 109 ConsoleSingleton.getConsole().message((String )message + " : " + throwable.toString()); 110 } 111 112 115 public void trace(Object message) { 116 ConsoleSingleton.getConsole().message((String )message); 117 } 118 119 122 public void warn(Object message, Throwable throwable) { 123 ConsoleSingleton.getConsole().message((String )message + " : " + throwable.toString()); 124 } 125 126 129 public void warn(Object message) { 130 ConsoleSingleton.getConsole().message((String )message); 131 } 132 133 134 137 public boolean isDebugEnabled() { 138 return false; 139 } 140 141 144 public boolean isErrorEnabled() { 145 return false; 146 } 147 148 151 public boolean isFatalEnabled() { 152 return true; 153 } 154 155 158 public boolean isInfoEnabled() { 159 return false; 160 } 161 162 165 public boolean isTraceEnabled() { 166 return false; 167 } 168 169 172 public boolean isWarnEnabled() { 173 return false; 174 } 175 176 } | Popular Tags |