public class ApacheCommonsLogFactory extends LogFactory
name
Constructor and Description |
---|
ApacheCommonsLogFactory() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkLogExist(Class<?> logClassName)
检查日志实现是否存在
此方法仅用于检查所提供的日志相关类是否存在,当传入的日志类类不存在时抛出ClassNotFoundException 此方法的作用是在detectLogFactory方法自动检测所用日志时,如果实现类不存在,调用此方法会自动抛出异常,从而切换到下一种日志的检测。 |
Log |
createLog(Class<?> clazz)
创建日志对象
|
Log |
createLog(String name)
创建日志对象
|
create, get, get, get, getCurrentLogFactory, getLog, getLog, getName, setCurrentLogFactory, setCurrentLogFactory
public Log createLog(String name)
LogFactory
createLog
in class LogFactory
name
- 日志对象名public Log createLog(Class<?> clazz)
LogFactory
createLog
in class LogFactory
clazz
- 日志对应类protected void checkLogExist(Class<?> logClassName)
LogFactory
checkLogExist
in class LogFactory
logClassName
- 日志实现相关类Copyright © 2024. All rights reserved.