OtrosLogViewer出错

Tri*_*Hai 2 glassfish log-analysis logfile otroslogviewer

我正在使用OtrosLogViewer来分析我的glassfish日志文件.但似乎软件无效.我认为我的模式是错误的.

type=log4j
customLevels=SEVERE=FATAL,WARNING=WARN,CONFIG=INFO,FINE=DEBUG,FINER=TRACE,FINEST=TRACE,INFO=INFO
pattern=[#|TIMESTAMP|LEVEL|PROP(ProductName-Version)|LOGGER|_ThreadID=PROP(ThreadID);_ThreadName=THREAD;PROP(Properties);|MESSAGE|#]
dateFormat=yyyy-MM-dd'T'HH:mm:ss.SSSZ
name=GlassFish logger
charset=UTF-8
Run Code Online (Sandbox Code Playgroud)

这是我的服务器日志示例(Glassfish 4.0):

[2013-10-13T17:36:03.841+0700] [glassfish 4.0] [WARNING] [endpoint.activation.failure] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.inbound] [tid: _ThreadID=34 _ThreadName=admin-listener(1)] [timeMillis: 1381660563841] [levelValue: 900] [[
RAR8501: Exception during endpoint activation for ra [ jmsra ], activationSpecClass [ com.sun.messaging.jms.ra.ActivationSpec ] : javax.resource.ResourceException: MQRA:EC:Invalid destinationLookup jms/NewMessage configured in ActivationSpec of MDB for no JNDI name found]]

[2013-10-13T17:36:03.841+0700] [glassfish 4.0] [SEVERE] [containers.mdb.create_container_exception] [javax.enterprise.system.container.ejb.mdb.org.glassfish.ejb.mdb] [tid: _ThreadID=34 _ThreadName=admin-listener(1)] [timeMillis: 1381660563841] [levelValue: 1000] [[
MDB00017: [NewMessage]: Exception in creating message-driven bean container: [java.lang.Exception]]]
Run Code Online (Sandbox Code Playgroud)

如何修改我的模式使其工作?我对OtrosLogViewer的模式很困惑.

谢谢.

Krz*_*zyH 7

您可以使用这些格式来解析您的问题中的日志:

type=log4j
pattern=[TIMESTAMP] [PROP(server)] [CLASS] [LEVEL] [PROP(someClass)] [tid: _ThreadID=PROP(ThreadID) _ThreadName=THREAD] [timeMillis: PROP(timeMilis)] [levelValue: PROP(levelValue)] MESSAGE
name=My glassfish format
dateFormat=yyyy-MM-dd'T'HH:mm:sZ
Run Code Online (Sandbox Code Playgroud)

我对你的日志有以下假设:

[2013-10-13T17:36:03.841+0700] - timestamp
[glassfish 4.0] - PROP(server)
[WARNING]  - Level
[endpoint.activation.failure] - Class
[javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.inbound] PROP(someClass)
[tid: _ThreadID=34 _ThreadName=admin-listener(1)] - Thread info
[timeMillis: 1381660563841]  - PROP(timeMillis)
[levelValue: 900] - PROP(levelValue)
[[RAR8501: Exception during endpoint activation for ra [ jmsra ], activationSpecClass [ com.sun.messaging.jms.ra.ActivationSpec ] : javax.resource.ResourceException: MQRA:EC:Invalid destinationLookup jms/NewMessage configured in ActivationSpec of MDB for no JNDI name found]] - Message
Run Code Online (Sandbox Code Playgroud)

OtrosLogViewer还有Log4j模式解析器编辑器.您可以在菜单工具中找到它.