glassfishlogfilelog-analysisotroslogviewer

Error in OtrosLogViewer


i'm using OtrosLogViewer to analyze my glassfish log file. But it seems the software not working. I think my pattern is wrong.

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

Here's my example of server log (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]]]

How to modify my pattern to make it work? i'm quite confused about OtrosLogViewer's pattern.

Thanks.


Solution

  • You can use these format to parse log in your question:

    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
    

    I had following assumption about your log:

    [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
    

    OtrosLogViewer has also Log4j pattern parser editor. You can found it in menu Tools.