spring AOP 里面private Logger logger=Logger.getLogger(this.getClass().getName());他的作用是什么?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/01 08:16:06

spring AOP 里面private Logger logger=Logger.getLogger(this.getClass().getName());他的作用是什么?
spring AOP 里面private Logger logger=Logger.getLogger(this.getClass().getName());
他的作用是什么?

spring AOP 里面private Logger logger=Logger.getLogger(this.getClass().getName());他的作用是什么?
Logger是一个日志类,通过getLogger方法创建一个 this.getClass().getName() 也就是标识当前类的looger对象,来记录当前类可能发生的异常