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