1 16 17 package org.apache.log4j.spi; 18 19 import org.apache.log4j.*; 20 import org.apache.log4j.helpers.LogLog; 21 22 24 27 final public class RootCategory extends Logger { 28 29 33 public 34 RootCategory(Level level) { 35 super("root"); 36 setLevel(level); 37 } 38 39 40 44 final 45 public 46 Level getChainedLevel() { 47 return level; 48 } 49 50 55 final 56 public 57 void setLevel(Level level) { 58 if(level == null) { 59 LogLog.error("You have tried to set a null level to root.", 60 new Throwable ()); 61 } 62 else { 63 this.level = level; 64 } 65 } 66 67 final 68 public 69 void setPriority(Level level) { 70 setLevel(level); 71 } 72 73 74 } 75 | Popular Tags |