1 26 27 package org.objectweb.corba.util; 28 29 38 39 public class BasicLoggerImpl 40 implements Logger 41 { 42 48 51 public static final boolean isTraceLogged = false ; 53 56 public static final boolean isErrorLogged = false ; 58 61 protected java.io.PrintStream output_ = System.err; 62 63 69 70 public 71 BasicLoggerImpl() 72 { 73 } 74 75 86 94 public 95 void trace(Object caller, 96 String message) 97 { 98 if(isTraceLogged) { 99 output_.println(caller + ": " + message + '.'); 100 } 101 } 102 103 111 public 112 void error(Object caller, 113 String message) 114 { 115 if(isErrorLogged) { 116 try { 117 throw new Error (message); 118 } catch (Error exc) { 119 output_.print(caller + ": " + message + "!!!"); 120 exc.printStackTrace(); 121 } 122 } 123 } 124 125 } 131 | Popular Tags |