System.Logger
getName()
isLoggable()
log() 只用了String方法,其他的先放着
System.Logger log = System.getLogger("asd"); System.out.println(log.getName()); System.out.println("ALL:"+log.isLoggable(System.Logger.Level.ALL)); System.out.println("FINER:"+log.isLoggable(System.Logger.Level.TRACE)); System.out.println("FINE:"+log.isLoggable(System.Logger.Level.DEBUG)); System.out.println("INFO:"+log.isLoggable(System.Logger.Level.INFO)); System.out.println("WARNING:"+log.isLoggable(System.Logger.Level.WARNING)); System.out.println("SEVERE:"+log.isLoggable(System.Logger.Level.ERROR)); System.out.println("OFF:"+log.isLoggable(System.Logger.Level.OFF)); log.log(System.Logger.Level.INFO,"他们都是傻逼,都是傻逼"); log.log(System.Logger.Level.WARNING,"他们都是傻逼,都是傻逼"); log.log(System.Logger.Level.ERROR,"他们都是傻逼,都是傻逼"); log.log(System.Logger.Level.OFF,"他们都是傻逼,都是傻逼");
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)