Topic: 请大虾解释一下这个问题(logger.setLevel((Level)Level.WARN);)

  Print this page

1.请大虾解释一下这个问题(logger.setLevel((Level)Level.WARN);) Copy to clipboard
Posted by: pursuer2004
Posted on: 2005-11-03 09:22

logger.setLevel((Level)Level.WARN);
logger.setLevel(Level.WARN);
有什么区别?

2.Re:请大虾解释一下这个问题 [Re: pursuer2004] Copy to clipboard
Posted by: why
Posted on: 2005-11-03 13:12

Apparently they should be the same, since Level.WARN is a Level
However, for historical reasons, developer writes logger.setLevel((Level)Level.WARN); when log4j is being used.
see http://logging.apache.org/log4j/docs/api/index.html

3.Re:请大虾解释一下这个问题 [Re: pursuer2004] Copy to clipboard
Posted by: xiaosilent
Posted on: 2005-11-03 21:28

Thanks Why first .
I can learn not the knowledge of java programming but also english .


   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