我正在尝试让SLF4J和JUL在多米诺骨牌上进行日志记录。我创建了一个名为'DominoGraphHandler'的自定义处理程序来将日志写入数据库。当通过Xpages调用代码时,它会抛出异常。 SLF4J和log4J组合也没有用。有没有办法让SLF4J在多米诺骨牌上工作。以下是示例代码和异常详细信息。
public void testJUL()
{
java.util.logging.Logger jLogger = java.util.logging.Logger.getLogger("com.app.log");
jLogger.setLevel(Level.WARNING);
jLogger.addHandler(new DominoGraphHandler());
jLogger.warning("warning message");
}
Xpages错误消息:
错误500
HTTP Web服务器:命令未处理异常
多米诺/工作区/日志/错误日志-0.xml
<CommonBaseEvent creationTime="2017-11-15T17:41:18.338+05:30" globalInstanceId="ELc0a80aa500015fbf94954000000006" msg="CLFAD0246E: Exception occurred servicing request for: /logging.nsf/log.xsp - HTTP Code: 500" severity="50" version="1.0.1">
<extendedDataElements name="CommonBaseEventLogRecord:level" type="noValue">
<children name="CommonBaseEventLogRecord:name" type="string">
<values>SEVERE</values>
</children>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:sourceClassName" type="string">
<values>com.ibm.domino.xsp.bridge.http.engine.XspCmdManager</values>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:sourceMethodName" type="string">
<values>service</values>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:Exception" type="string">
<values>java.lang.RuntimeException: com.ibm.xsp.FacesExceptionEx: java.lang.NoClassDefFoundError: com.sun.faces.config.ConfigureListener (initialization failure)
	at com.ibm.designer.runtime.domino.adapter.ComponentModule.initModule(ComponentModule.java:461)
	at com.ibm.domino.xsp.module.nsf.NSFComponentModule.initModule(NSFComponentModule.java:498)
	at com.ibm.domino.xsp.module.nsf.NSFService.createNSFModule(NSFService.java:752)
	at com.ibm.domino.xsp.module.nsf.NSFService.loadModule(NSFService.java:735)
	at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:588)
	at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
	at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:350)
	at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:306)
	at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
Caused by: </values>
<values>com.ibm.xsp.FacesExceptionEx: java.lang.NoClassDefFoundError: com.sun.faces.config.ConfigureListener (initialization failure)
	at com.ibm.xsp.config.CLBootStrap.initContext(CLBootStrap.java:89)
	at com.ibm.xsp.config.BootStrap.init(BootStrap.java:82)
	at com.ibm.xsp.config.ConfigureCoreListener.contextInitialized(ConfigureCoreListener.java:39)
	at com.ibm.designer.runtime.domino.adapter.ComponentModule.initModule(ComponentModule.java:453)
	... 8 more
Caused by: java.lang.NoClassDefFoundError: com.sun.faces.config.ConfigureListener (initialization failure)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
	at java.lang.Class.forNameImpl(Native Method)
	at java.lang.Class.forName(Class.java:182)
	at com.ibm.xsp.util.Delegation.newInstance(Delegation.java:80)
	at com.ibm.xsp.util.Delegation.getImplementation(Delegation.java:68)
	at com.ibm.xsp.config.CLBootStrap.getListener(CLBootStrap.java:150)
	at co</values>
<values>m.ibm.xsp.config.CLBootStrap.initContext(CLBootStrap.java:81)
	... 11 more
</values>
</extendedDataElements>
<sourceComponentId component="Expeditor 6.2" componentIdType="ProductName" instanceId="" location="pilotdev5" locationType="Hostname" subComponent="" threadId="0" componentType="http://www.w3.org/2001/XMLSchema-instance"/>
<situation categoryName="ReportSituation">
<situationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ReportSituation" reasoningScope="INTERNAL" reportCategory="LOG"/>
</situation>
</CommonBaseEvent>