If the log format has the following problems:
- Not the same number of columns on all the lines.
- if you have words(columns) you want to drop.
- if you want to drop non numeric characters from certain columns.(not a mandatory feature)
- ignore lines that their size is less then a certain number.
run the attached jar with the right arguments supplied
java -jar fileFixer.jar file=c:\Users\ziv.hilu\Documents\tickets\10391\fromTicket\sjc-sample_orig.txt "wordsToDrop=reason=\"TCP FIN\" , reason=\"TCP RST\" , reason=\"unset\" " columnsToFix=28,30 delimiter=32 lineSize=31
- file is the log file you want to parse.
- wordsToDrop is words you want to drop from the file separated by comma. remember that if words contain special characters it needs to be escaped with \.
- columnsToFix(Optional) is columns you want to drop non numeric characters from its value.
- delimiter(Optional) is the delimiter in the file
The result will be a log file with name fixedFile.log on the same location where the original log were.