Java: Inspect Websphere Application Server Logs with Ostros Log Viewer

By | February 8, 2017

Working with Enterprise applications deployed on Websphere Application Server ND and having to determine some issues from the logs sometimes can be a handful. The sheer amount of information that is spilled by the container in the logs is overwhelming.
Usually I end up having to find the needle in the haystack looking into 5 or more 10MB (that is the set limit for one log file in the container) application server logs SystemOut.log for some minor log entry. When you also have processing being parallelized across several instances , just reading the log with a text editor is hopeless.
Looking for an OSS solution to make some sense in the logs I found Ostros Log Viewer.
The beauty of this software is:
– java application so a natural cross-platform
– highly configurable
– able to deal with huge logs limited only by the allocated heap memory

After installing the olv on your computer the only thing I had to do is top define a log reader pattern.
Add under olv/plugins/logimporters a file named was.pattern having the following content


type=log4j
pattern=[TIMESTAMP] THREAD LOGGER LEVEL CLASS METHOD MESSAGE
dateFormat=M/dd/yy hh:mm:ss:SSS z
name=WAS
charset=windows-1252
customLevels=I=INFO,E=ERROR,A=INFO,D=DEBUG,T=TRACE,>=TRACE,<=TRACE,3=DEBUG,2=DEBUG,1=DEBUG

Restart olv and you will see at the front page this new log importer pattern under WAS name.

If you want you can change the order or the fields or add more of them. I prefer this clutter free form that ha only the essential info as ERROR, THREAD METHOD etc.
This are the definitions you can use in olv patterns.


# Specify the description (used as tooltip) by adding the 'description ' property.
# Specify the log pattern by adding the 'pattern' property. The supplied keywords in value field are:
# TIMESTAMP
# LOGGER
# LEVEL
# THREAD
# CLASS
# FILE
# LINE
# METHOD
# RELATIVETIME
# MESSAGE
# NDC
# PROP(key)
# Specify the date format by adding the property 'dateFormat', using patterns from java.text.SimpleDateFormat
# For custom level mapping, add the property 'customLevels' providing values in the format CustomLevel1=Log4jLevel,CustomLevel2=Log4jLevel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.