1 25 26 package org.objectweb.common; 27 28 import org.objectweb.util.monolog.api.LoggerFactory; 29 import org.objectweb.util.monolog.api.Logger; 30 import org.objectweb.util.monolog.api.BasicLevel; 31 import org.objectweb.util.monolog.wrapper.printwriter.LoggerImpl; 32 33 class DummyLogger extends LoggerImpl { 34 35 38 39 public void log(int level, java.lang.Object o) { 40 } 41 } 42 43 51 public class TraceCore { 52 53 static public Logger logger = new DummyLogger(); 54 static public Logger sec = new DummyLogger(); 55 static public Logger jacc = new DummyLogger(); 56 57 static public void configure(LoggerFactory lf) { 58 logger = lf.getLogger("org.objectweb.common"); 59 sec = lf.getLogger("org.objectweb.jonas.security"); 60 jacc = lf.getLogger("org.objectweb.jonas.security.jacc"); 61 } 62 63 64 static public boolean isDebugSec() { 65 return (sec != null) && sec.isLoggable(BasicLevel.DEBUG); 66 } 67 } 68 69 | Popular Tags |