Closed laywin closed 2 years ago
Describe the bug 当apollo.bootstrap.eagerLoad.enabled=true时,Apollo初始化过程中的日志均无法输出
To Reproduce Steps to reproduce the behavior: 当apollo.bootstrap.eagerLoad.enabled=true时,spring boot日志系统并未初始化好,这个过程中产生的日志均无法输出
Expected behavior 建议可以根据类似spring boot中DeferredLog的处理方式来进行这个阶段的日志打印
目前确实存在这个问题,粗看了下 DeferredLog 的实现,大致是先把日志存在内存中,然后在接收到 ApplicationPreparedEvent 后再把日志输出,应该是可以借鉴实现一下的
参考 DeferredLog 的方式,缓存了下日志系统未初始化前的日志,详情见 pr:https://github.com/ctripcorp/apollo/pull/3677
implemented by #3677
Describe the bug 当apollo.bootstrap.eagerLoad.enabled=true时,Apollo初始化过程中的日志均无法输出
To Reproduce Steps to reproduce the behavior: 当apollo.bootstrap.eagerLoad.enabled=true时,spring boot日志系统并未初始化好,这个过程中产生的日志均无法输出
Expected behavior 建议可以根据类似spring boot中DeferredLog的处理方式来进行这个阶段的日志打印