Topic: 方法里的log信息不能输出?

  Print this page

1.方法里的log信息不能输出? Copy to clipboard
Posted by: lisycn
Posted on: 2005-10-26 16:24

import java.util.logging.*;
public class log{
  int i=8;
  public static Logger logger=Logger.getLogger(log.class.getName());
public static void main(String[] args){
   log logg=new log();
  
   logger.warning("warning message");
   logger.log(Level.INFO,"info message form log");
   System.out.println("--------------------");
   logg.echo2("Hello world",98);
}


//记录其他方法进入时与返回时的某些值的变化
public void echo2(String msg,int type){
  logger.entering("Test Logger","echo2",new Object[]{msg,new Integer(type)});
  System.out.println("ok");
  Boolean result=new Boolean(true);
  
  logger.exiting("Test Logger","echo2",result);
}
}

2.Re:方法里的log信息不能输出? [Re: lisycn] Copy to clipboard
Posted by: lisycn
Posted on: 2005-10-26 16:29

为什么方法echo2里的log信息不能输出啊,logger.entering()和logger.exiting()的信息都看不见


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923