We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.slf4j.spi.SLF4JServiceProvider 是指 SPI 服务声明文件 mirai-console/backend/mirai-console/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider
mirai-console/backend/mirai-console/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider
mirai/mirai-console/backend/mirai-console/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider
Line 1 in 453ad6b
因为 net.mamoe.mirai.console.internal.logging.externalbind.slf4j.MiraiConsoleSLF4JService 需要 mirai-console frontend 的存在才能正常工作(初始化)
net.mamoe.mirai.console.internal.logging.externalbind.slf4j.MiraiConsoleSLF4JService
mirai-console frontend
在某些没有 frontend 的环境中,例如单元测试,MiraiConsoleSLF4JService 会影响 SLF4 日志框架 的正常执行
frontend
MiraiConsoleSLF4JService
SLF4
The text was updated successfully, but these errors were encountered:
@Karlatemp 你觉得重要么
Sorry, something went wrong.
这甚至导致了单元测试里 内存溢出 因为 SLF4JServiceProvider 在 mirai-console 没有 初始化的时候会吃掉所有等级的全部日志,等待 mirai-console 初始化再放出 如果用到 netty 这种大量日志的库 很快就炸了
内存溢出
@Him188 顺便再说一下 mirai-console 是默认包括在 由 gradle 插件 构建的插件开发环境中的
也就是说,2.14.0-RC 中 不特殊配置是没有任何 slf4j 日志打印,而且会有内存溢出的可能性
原因是 MiraiConsoleSLF4JService 加载的顺序在 slf4j-simple 之前,且没有 mirai-console 实例加载时不可用
Successfully merging a pull request may close this issue.
org.slf4j.spi.SLF4JServiceProvider 是指 SPI 服务声明文件
mirai-console/backend/mirai-console/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider
mirai/mirai-console/backend/mirai-console/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider
Line 1 in 453ad6b
因为
net.mamoe.mirai.console.internal.logging.externalbind.slf4j.MiraiConsoleSLF4JService
需要
mirai-console frontend
的存在才能正常工作(初始化)在某些没有
frontend
的环境中,例如单元测试,MiraiConsoleSLF4JService
会影响SLF4
日志框架 的正常执行The text was updated successfully, but these errors were encountered: