Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse glassfish logfiles #97

Closed
GoogleCodeExporter opened this issue Mar 17, 2015 · 11 comments
Closed

parse glassfish logfiles #97

GoogleCodeExporter opened this issue Mar 17, 2015 · 11 comments

Comments

@GoogleCodeExporter
Copy link

This server writes the log with Java-Logging but ha its own format like:


[#|2011-08-10T12:03:30.743+0200|INFO|glassfish3.1|com.sun.xml.ws.monitoring|_Thr
eadID=54;_ThreadName=Thread-1;|Closing Metro monitoring root: 
amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/__wstx-services-WSATCoordin
ator-Participant|#]

is there any way to configure this?

Can I help?

juergen




Original issue reported on code.google.com by juergens...@gmail.com on 10 Aug 2011 at 10:40

@GoogleCodeExporter
Copy link
Author

Use log4j pattern parser editor or create new file *.pattern in 
plugins\logimporters\

Enter following lines in your *.pattern file:
{{{
type=log4j
pattern=[#|TIMESTAMP|LEVEL|PROP(A)|CLASS|_ThreadID=PROP(B);_ThreadName=THREAD;|M
ESSAGE|#]
dateFormat=yyyy-MM-ddTHH:mm:ss.SSSZZZZ
name=My custome log parser
charset=UTF-8
}}}

Original comment by otros.sy...@gmail.com on 22 Aug 2011 at 8:58

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Just want to note that with the February 2012 Version, the pattern above does 
not work anymore. It seems that the new Otros Version has trouble with the 'T' 
in the dateFormat. This one here works:

type=log4j
pattern=[#|TIMESTAMP|LEVEL|PROP(A)|CLASS|_ThreadID=PROP(B);_ThreadName=THREAD;|M
ESSAGE|#]
dateFormat=yyyy-MM-dd'T'HH:mm:ss.SSSZZZZ
name=Glassfish logs
customLevels=SEVERE=FATAL
charset=UTF-8

Original comment by bze...@gmail.com on 27 Feb 2012 at 11:55

@GoogleCodeExporter
Copy link
Author

The customLevels does seem to work propery though...

Original comment by bze...@gmail.com on 27 Feb 2012 at 11:59

@GoogleCodeExporter
Copy link
Author

I think I figured it out. Otros seems to have problems with newlines before the 
trailing |#]. If it is just intereted to be part of the message, it works ok.

type=log4j
customLevels=SEVERE=FATAL,WARNING=WARN,CONFIG=INFO,FINE=DEBUG,FINER=TRACE,FINEST
=TRACE,INFO=INFO
pattern=[#|TIMESTAMP|LEVEL|PROP(A)|CLASS|_ThreadID=PROP(B);_ThreadName=THREAD;|M
ESSAGE
dateFormat=yyyy-MM-dd'T'HH:mm:ss.SSSZZZZ
name=Glassfish Logfile
charset=UTF-8

Original comment by bze...@gmail.com on 27 Feb 2012 at 12:19

@GoogleCodeExporter
Copy link
Author

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(Threa
dID);_ThreadName=THREAD;PROP(Properties);|MESSAGE|#]
dateFormat=yyyy-MM-dd'T'HH:mm:ss.SSSZ
name=GlassFish logger
charset=UTF-8

This is finally glassfish log view pattern :)

Original comment by Snook1...@gmail.com on 15 Apr 2013 at 1:02

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

What about GF 4.0? it seems very different from v2 & v3. can you update the 
pattern pls? Thanks.

Original comment by trieulh...@gmail.com on 1 Dec 2013 at 8:35

@GoogleCodeExporter
Copy link
Author

Hi.
Is this solution to GF 4.0?
http://stackoverflow.com/questions/20311037/error-in-otroslogviewer

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.

Original comment by otros.sy...@gmail.com on 2 Dec 2013 at 10:17

@GoogleCodeExporter
Copy link
Author

Original comment by otros.sy...@gmail.com on 10 Mar 2014 at 3:34

  • Changed state: Verified

@GoogleCodeExporter
Copy link
Author

Original comment by otros.sy...@gmail.com on 10 Mar 2014 at 3:38

  • Added labels: Milestone-Release0.1.0

@ghost
Copy link

ghost commented Jul 20, 2016

i have a strange problem with the above pattern for glassfish 4+. TIMESTAMP seems date/time when file parsed end not date/time in log file.

Anyone some idea please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant