0

I do have multiple log files( f1.txt and f2.txt) and i need to compare their output and figure out if we have any issues in the newer code version that was not existing in the previous one.

For that purpose I ran the command :

FC path1 path2

and got the error Resync Failed. Files are too different.

which is correct. my 2 files will have different paths and the format of checking the logs will be

Searching in file pathtologs1
Searching in file pathtologs2
Line Number =   110   2021-12-22 12:09:28.358| ERROR| Test| Invalid package Index...
Line Number =   150   2021-12-22 12:09:28.660| ERROR| Test| Invalid package Index...
Searching in file pathtologs3

so in case no error was seen in pathtologsx we get no lines under it and in case there is we get the line number of each error, and there is always the possibility of the new code version having log files not in the previous one or having the same exception but the line numbers would not be the same between f1 of path1 and f2 of path2 or even in case the exceptions are matching we still will not get complete lines match since pathtologs1 of file1 will be different to pathtologs1 of file2 in addition to the date and time displayed, is there any command other than FC that i can use to effectively show me the comparison(using windows)

sara
  • 109
  • 1
  • 7
  • Besides `fc` there is `comp`, although I guess this is worse. Anyway, you could play around with the `/LB` option of `fc`… – aschipfl Dec 26 '21 at 20:28
  • yh comp will let you know that they're different sizes definitely not the right command. – sara Dec 26 '21 at 20:45
  • You could, before comparing files, extract important lines from log files for example using `findstr` (eg `findstr "error" log1.txt >> summary1.txt` ... `findstr "warning" log1.txt >> summary1.txt`). But above all you could ask that log files be delivered to you with less useless information (ex: filename repeated everywhere, date with seconds+milliseconds repeated everywhere). –  Dec 27 '21 at 01:05

0 Answers0