示例#1
0
文件: LogTools.java 项目: visik7/jpod
 protected static void setFileHandlerLevel(Handler handler, Level newLevel) {
   if (handler instanceof FileHandler) {
     handler.setLevel(newLevel);
   } else if (handler instanceof CompositeHandler) {
     setFileHandlerLevel(((CompositeHandler) handler).getHandlers(), newLevel);
   } else if (handler instanceof DelegatingHandler) {
     setFileHandlerLevel(((DelegatingHandler) handler).getBaseHandler(), newLevel);
   } else {
     //
   }
 }
示例#2
0
文件: LogTools.java 项目: visik7/jpod
 public static void setFileHandlerLevel(Logger logger, Level newLevel) {
   logger.setLevel(newLevel);
   Handler[] handlers = logger.getHandlers();
   setFileHandlerLevel(handlers, newLevel);
 }
示例#3
0
文件: LogTools.java 项目: visik7/jpod
 protected static void setFileHandlerLevel(Handler[] handlers, Level newLevel) {
   for (Handler handler : handlers) {
     setFileHandlerLevel(handler, newLevel);
   }
 }