需要关闭 Logger 的处理程序
是否需要手动关闭java.util.logging.Logger
的所有处理程序
?例如在类的终结器中?
Is it needed to close all handlers
of a java.util.logging.Logger
manually? e.g. in the finalizer of the class?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您要从记录器中删除处理程序,则必须将其关闭。否则,如果处理程序仍附加到记录器,LogManager 安装的关闭挂钩将为您关闭处理程序。
If you are removing the handler from the logger then you'll have to close it. Otherwise, if the handler is still attached to the logger a shutdown hook installed by the LogManager will close the handler for you.