记录多个一起工作的 OSGi 包
处理涉及多个 OSGi 包的应用程序。 SLF4j 是底层日志框架。我是否需要为每个捆绑包单独配置logger.properties
,或者是否有用于 OSGi 捆绑包的特定日志记录方法?
在前一种情况下,每个包记录到文件中的顺序会发生什么情况?
Working on an application which involves multiple OSGi bundles. SLF4j is the underlying logging framework. Do I need to configure the logger.properties
separately for each bundle or is there any specific logging approach used for OSGi bundles?
In former case, what will happen to the sequence of logging for each bundle into the file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 Apache Sling 的 org.apache.sling.commons.log 包,它提供了与 OSGi 配合良好的 SLF4j 实现。请参阅 http://sling.apache.org/site/logging.html ,从以下位置下载http://sling.apache.org/site/downloads.cgi 或来自 Maven Central 。
You could use Apache Sling's org.apache.sling.commons.log bundle, which provides an SLF4j implementation that plays well with OSGi. See http://sling.apache.org/site/logging.html , downloads from http://sling.apache.org/site/downloads.cgi or from Maven Central.