还有Logger log = Logger.getLogger(Class clazz)参数中的这个类是什么意思?
解决方案 »
- 一段验证你电脑有没有H片的javascript代码
- IBatis调用MySQL存储过程出错,谁先解决分就是谁的
- 使用hibernate+struts2.2解析JSON时产生多余的SQL语句
- 搞不懂JDK已有的方法Spring干嘛重写
- struts2不经过拦截器切换语言环境
- Axis2
- 一个部署时的问题
- jsp+servelet+javabean+sqlserver2005学生成绩管理系统中updateservelet怎样编写
- jsp运行时生成的class文件位置在哪,我忘记了,对了我用的是tomcat4.
- 有关实体BEAN的问题!!高分
- jsp,java,javascript如何传递数据
- JAVA关于分层的概念(Service和DAO间)
比如你可以这样用
public class Hello {
Logger log = Logger.getLogger(Hello.class) ;
}
Class c = String.class ;
比如EDITPLUS: 文档 - 》 文件编码------------------------------------------------
看一下,下面这两个文档说明:
public static Logger getLogger(Class clazz)
Shorthand for getLogger(clazz.getName()).
参数
clazz - The name of clazz will be used as the name of the logger to retrieve. See getLogger(String) for more detailed information.public static Logger getLogger(String name)
Retrieve a logger named according to the value of the name parameter. If the named logger already exists, then the existing instance will be returned. Otherwise, a new instance is created.
By default, loggers do not have a set level but inherit it from their neareast ancestor with a set level. This is one of the central features of log4j.参数
name(名称) - The name of the logger to retrieve.就是单例模式的意思
是要完成什么功能? ..