1 16 19 20 package org.apache.pluto.portalImpl.services.log; 21 22 import org.apache.pluto.portalImpl.services.ServiceManager; 23 import org.apache.pluto.services.log.Logger; 24 25 32 33 public class Log 34 { 35 36 private static Logger log = 37 getService().getLogger("org.apache.pluto.portalImpl"); 38 39 public static boolean isDebugEnabled() { 40 return log.isDebugEnabled(); 41 } 42 43 public static boolean isInfoEnabled() { 44 return log.isInfoEnabled(); 45 } 46 47 public static boolean isWarnEnabled() { 48 return log.isWarnEnabled(); 49 } 50 51 public static boolean isErrorEnabled() { 52 return log.isErrorEnabled(); 53 } 54 55 public static void debug(String aMessage) { 56 log.debug(aMessage); 57 } 58 59 public static void debug(String aMessage, Throwable aThrowable) { 60 log.debug(aMessage, aThrowable); 61 } 62 63 public static void info(String aMessage) { 64 log.info(aMessage); 65 } 66 67 public static void warn(String aMessage) { 68 log.warn(aMessage); 69 } 70 71 public static void error(String aMessage) { 72 log.error(aMessage); 73 } 74 75 public static void error(String aMessage, Throwable aThrowable) { 76 log.error(aMessage, aThrowable); 77 } 78 79 public static void error(Throwable aThrowable) { 80 log.error(aThrowable); 81 } 82 83 93 public static LogService getService() { 94 LogService ls = (LogService) 95 ServiceManager.getService(LogService.class); 96 if(ls==null) 97 ls = StandardOutLogService.getInstance(); 98 return ls; 99 } 100 101 } 102 | Popular Tags |