构造Slf4jLogger时有bug
- Dominant language
- Java
- Stars
- 17
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
在使用org.slf4j.LoggerFactory.getLogger(String name)的返回值作为参数构造Slf4jLogger实例时,忽略了并发初始化日志的场景,当日志正在初始化过程中时,此时获取LoggerFactory实例为org.slf4j.helpers.SubstituteLoggerFactory,返回的logger实例将为org.slf4j.helpers.SubstituteLogger,**此时不应该抛出异常,返回的logger对象亦不应缓存起来**,下次等到logger初始化完成后,会返回正常logger实例。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the Slf4jLogger constructor and inspect how it handles the logger returned by org.slf4j.LoggerFactory.getLogger(String name). Reproduce the initialization-time case involving SubstituteLoggerFactory and SubstituteLogger; done means no exception is thrown, the temporary logger is not cached, and a later lookup can return the initialized logger.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100