Installation & Usage

JLog is written in JAVA, so you have to install first a JRE if you don't allready have one. It supports any JRE version greater than 1.4. The scripting engine works with JRE 1.3 (tested) and maybe 1.2 (not tested).

Then you have to unzip the package in one directory. Now JLog is ready to run.

Configuration

The configuration is hold in properties files. Note that you have to keep the 3 first commented lines as in the sample configuration (JLog looks for these strings in order to know if it's a JLog configuration and display it in the "Open configuration" menu).


1. General configuration

You first have to edit once the file "JlogCommonConfig.properties" which holds the common configuration. Here is the detail of the fields:

workingDir: The root directory where the downloaded logs will be stored. The logs are downloaded in a subfolder named by the log configuration properties file. For instance, if you have a configuration named "defaultCfg.properties", a subfolder named defaultCfg will be created in "workingDir". Before any download, the subfolder content will be deleted. So, to be safe, always choose a non existing directory as workingDir.

reportDir: The root directory where the reports will be stored.

viewerCmd: The commend line used to display log files.

For instance:

UltraEdit : C:/Program\ Files/IDM\ Computer\ Solutions/UltraEdit-32/ uedit32.exe\ %file%/%line%
TextPad : C:/Program\ Files/TextPad\ 4/TextPad.exe\ %file%(%line%)
VI : /usr/openwin/bin/xterm -geometry 150x60 -e vi -c %line% %file%

Use %file% as parameter for the filename and %line% for the line number. Use "\ " for white spaces.

tooltipDisplayTime: the delay the tooltips will be displayed in seconds.

showMessagesTooltips: initial option value, can be "true" or "false".

rememberFilters: initial option value, can be "true" or "false".

useMultipleFilters: initial option value, can be "true" or "false".

prefixMessagesInMerge: initial option value, can be "true" or "false".

displayParsingTime: print time spent to analyse logs in the output. This is very helpfull to optimize a parser. Optional, default is false.

smoothProgressbar: make a first pass in the log file to get a smooth progress bar when analysing, but analysis take some extra time. Optional, default is true.

 

 

2. Logs configuration

Now you will create as many configuration file as you have logs type to analyse (for instance a configration for WebSphere SystemOut logs, one for SystemErr logs, etc.). Here is the detail of the fields:

freshInterval: Download only files modified after a time period in miniutes (-1 = download all files).

parserClass: The parser class to be used to analyse the logs. JLog is natively providing a parser for WebSphere SystemOut logs (com.renault.loganalyser.parser.WASOutarser), WebSphere SystemErr logs (com.renault.loganalyser.parser.WASErrParser), WebSphere Portal logs (com.renault.loganalyser.parser.WPParser), DotClear Blog appache logs (com.renault.loganalyser.parser.BlogParser) and a custom log format (com.renault.loganalyser.parser.PWEParser) whiwh may be adapted and used with any Log4j format.

Please look at the Parser plugin development section here to see how to code your own parser (it's a very easy task) to support another log format.

parseOnlyToday: Tell to the parser to report only log lines writen the current day, can be "true" or "false". Works only if the parser implements this functionality (any of the above persers do). Optional, default value is false.

datePattern: Specify the date pattern used to covert %today% and %yesterday% for the ftp log download patterns. It can contains YYYY, MM, DD, YY, M, D. For instance : "YYYY-MM-DD", "D.M.YY", etc. Optional, default is "YYYY-MM-DD".

filterN (N: number): Defines the initial filters used for this configuration. They are loaded and put in the filter combo box. You must put keys like : filter1, filter2, ... , filterN.

encodedLogins: Specify if using encoded logins and password for ftp logins (use runEncoder .bat or .sh to generate them). Optional, default value is false.

tryResuming: in ftp mode (not sftp yet), try to resume the file to download, optinal, default is false.

useSFTP: Use SFTP to download files, can be true or false. Optinal, default is false.

useGeronimoHack: Fix the log problem in geronimo.out (Apache Geronimo / WebSphere CE) until it is fixed in the server. Optional, default is false.

forceDownload: Download the file even if the file is allready present with the same size. Optional, default is false.

serverN (N: number): Defines the log files to download.

You must put keys like : server1, server2, ... , serverN.
The format must be :
"server","path","ftpLogin","ftpPassword","pattern",{"prefix"}
You can use %today% or %yesterday% in the pattern it will be converted to the datePattern format.
e.g. :
"serv1.domain.fr","/path/logs/was/","usr","pwd","SystemOut*.log","srv1_"

"serv1.domain.fr","path/logs/wps/","usr","pwd","wps*%today%*.gz"

prefix is on optional parameter. If u sepcify one, it will prefix the log filename, so you can download mutliple logs with the same name.

 

Usage

Using JLog is very easy. Once evrything is set up, just run it with : Windows: start javaw -classpath .;./edtftpj.jar;./logAnalyser.jar com.renault. loganalyser.ui.JMainFrame

Solrais (EXPORT DISPLAY first): java -classpath .:./edtftpj.jar:./logAnaly ser.jar com.renault.loganalyser.ui.JMainFrame

Next just download logs and analyse them. There is a very usefool feature: the filter option. With it you can apply inclusive or exclusive filters on the parsing result, so you can mask redondant messages and focus on uncommon ones. You can enter multiple filters using filter1+filter2+...
The filter typed are put in the combo box for futur usage until you disable the feature in the options. You can preload the filter list by entering filters in the configuration file. You can also reset the filter using "Tools > Reset filters" to the initial values.

Once the exceptions have been parsed and displayed, if you double-click one you get a detail window which displays the exception count in each log file. If you doubleclick a log filename in the detail window, the log file is opened in the defined viewer at the corresponding line for further analysis.

You can also do a custom search in all the logs, this is helpfull for instance if you want to see all log message which contains a userID. You access it with "Tools > Custom search".

The last options are to run a full analyse and report generation with one commande line in console mode:

java -classpath .:./edtftpj.jar:./logAnalyser.jar com.renault.loganaly ser.ui.JMainFrame cfgName export {today-N}

java -classpath .:./edtftpj.jar:./logAnalyser.jar com.renault.loganaly ser.ui.JMainFrame cfgName htmlexport {today-N}

cfgName is the name of the propertie file (without .properties extension).

You can pass the optional parameter today-N, N integer to analyse a specific day calculated from today.

and to merge all reports in one file:

java -classpath .:./edtftpj.jar:./logAnalyser.jar com.renault.loganaly ser.ui.JMainFrame cfgName merge {prefix}

prefix is optional and will prefix the message in the export with a number, so it's easier to analyse graphics generated by Microsoft Excel or equivalent.

Note you don't have to export the display on unix to run JLog in script mode.