Tool for merging logfiles
The mergelog.pl script is responsible for collecting and merging log files into one single Excel XLSX file.
If the tool is not present on your server, please download the package that is attached below and then install it: Install/Uninstall a package via the Shell
The log files are searched at the default log folder of the SEAL installation (..\applications\data\log). Although, other log directories can also be scanned by parameter specification.
The script is capable to parse different log formats, including JSON objects.
It extracts event information from every log line and organizes them in the following columns:
Timestamp
Level
Log file name
Line number (inside the respective log file)
Message
Raw JSON objects, when they are present.
The lines are coloured according to the log level, like:
INFO or I: Black font and white background
DEBUG: Gray font and white background
WARN or W: Red font and white background
ERROR or E: Black font and wed background
Every column already has auto-filters that can be adjusted accordingly.
The usage can be displayed by executing mergelog.pl in the SEAL Shell.
Then the possible options are listed:
-h show this help
-o name of the output file
-d directory containing all the logfiles to merge, default PLSLOG
-a after given time
-b before given time
time format may be ISO timestamp YYYY-MM-DDThh:mm:ss
example: -a 2020-12-10T14:00:00 -b 2020-12-11
or todays time hh:mm or week day name or yesterday
-m log file name matches STR (multiple Perl patterns are OR'ed)
-x exclude log files matching STR (OR'ed Perl patterns)
-p also add files from ProgramData/log
Important Notes
The 24h syntax must be used to specify the period.
We recommend using the -a and -b parameters in order to reduce the log entries to the time frame where the error occurred. This makes diagnosing it easier and faster.
Most of the time the files plossys.log and statistics.log are not necessary, you can exclude them with the option -x for each file that should be avoided.
Please also keep in mind that Excel can display 1048576 rows at maximum, all further entries are cut off.
Examples
Merge all log entries
o From: C:\SEAL\applications\data\log
o Between: December 8th, 2014 3PM and December 9th, 2014 2PM
o Into the file: C:\SEAL\applications\data\log\merged-log-20141208-20141209.xlsx
mergelog.pl -d c:\seal\applications\data\log -o c:\seal\applications\data\log\merged-log-20141208-20141209.xlsx -a 2014-12-08T15:00:00 -b 2014-12-09T14:00:00
Merge all log entries
o From: C:\SEAL\applications\data\log and C:\ProgramData\Seal Systems\log
o Between: December 8th, 2014 3PM and December 9th, 2014 2PM
o Into the file: C:\SEAL\applications\data\log\merged-log-20141208-20141209.xlsx
mergelog.pl -p -o c:\seal\applications\data\log\merged-log-20141208-20141209.xlsx -a 2014-12-08T15:00:00 -b 2014-12-09T14:00:00
Merge all log entries
o From: C:\SEAL\applications\data\log and C:\ProgramData\Seal Systems\log
o Between: December 8th, 2014 3PM and December 9th, 2014 2PM
o Excluding the files: plossys.log and statistics.log
o Into the file: C:\SEAL\applications\data\log\merged-log-20141208-20141209.xlsx
mergelog.pl -p -o c:\seal\applications\data\log\merged-log-20141208-20141209.xlsx -a 2014-12-08T15:00:00 -b 2014-12-09T14:00:00 -x plossys.log -x statistics.log
angehängte Dateien: 20180223_mergelog_2.13_part.zip