配置eclipse osgi日志 [英] Configure eclipse osgi log
问题描述
每当我启动osgi框架时,它会生成一个1317008078357.log的日志。如何将此日志重定向到客户端文件。我需要使用log4j作为osgi包吗? log4j.xml配置是什么?
日志文件包含:
!SESSION 2011-09-26 11:34:38.232 ----------------------------- ------------------
eclipse.buildId = unknown
java.version = 1.6.0_26
java.vendor = Sun Microsystems Inc.
BootLoader常量:OS = win32,ARCH = x86,WS = win32,NL = en_US
命令行参数:-configuration D:/ CommonNBI / Trunck / release_structure / server / nbi / snmp / conf - console
!ENTRY org.eclipse.osgi 2 0 2011-09-26 11:34:44.029
!MESSAGE加载类....可能没有被完全初始化。
!STACK 0
org.osgi.framework.BundleException:bundle的进度状态更改
Eclipse(Equinox)使用自己的记录器。要配置它,您可以在config.ini中定义记录器选项:
-
osgi.logfile
文件名 -
eclipse.log.level
设置将消息记录到eclipse日志时使用的级别。 -
eclipse.log.backup.max
允许的最大备份日志文件数。 -
eclipse.log.size.max
允许日志文件增长的Kb的最大大小。
Eclipse帮助中的更多详细信息( http://help.eclipse.org/galileo/index.jsp? topic = / org.eclipse.platform.doc.isv / reference / misc / runtime-options.html )
此处还有:登录Eclipse / OSGi插件
,这里: http://www.eclipsezone.com/eclipse/forums/t99588.html
I am using eclipse osgi jar. How to redirect the log generated by osgi to a file?
Whenever I start the osgi framework, it generates a log like 1317008078357.log. How to redirect this log to a custome file. Do I need to use log4j as a osgi bundle? what will be the log4j.xml configuration ?
log file contains:
!SESSION 2011-09-26 11:34:38.232 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -configuration D:/CommonNBI/Trunck/release_structure/server/nbi/snmp/conf -console
!ENTRY org.eclipse.osgi 2 0 2011-09-26 11:34:44.029
!MESSAGE While loading class .... may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: State change in progress for bundle ..
Eclipse (Equinox) uses his own logger. To configure it you can define the logger options in config.ini:
osgi.logfile file name
eclipse.log.level sets the level used when logging messages to the eclipse log.
eclipse.log.backup.max the max number of backup log files to allow.
eclipse.log.size.max the max size in Kb that the log file is allowed to grow.
more details in Eclipse Help (http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html)
also here: Logging in Eclipse/OSGi plugins and here: http://www.eclipsezone.com/eclipse/forums/t99588.html
这篇关于配置eclipse osgi日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!