Open bdovaz opened 2 weeks ago
Each data provider factory can have multiple different parser so this can be an addition to the existing one: https://github.com/Analogy-LogViewer/Analogy.LogViewer.RegexParser/blob/d0b36774f5fb4b5e144bd55a63599421cf7d728d/Analogy.LogViewer.RegexParser/IAnalogy/RegexDataProvidersFactory.cs#L14
we can can create new provider, something like RegexFullFileOfflineDataProvider
. You can implement it in a pr if you wish or I will try to get to it next week.
In our case, we have logs that either by our code or third parties, the reality is that they can generate multi-line logs.
For example, for a log to output a stacktrace:
The problem comes that although my regex works in regex101.com, I see that the implementation makes it read the file line by line and execute the regex line by line instead of as a whole:
https://github.com/Analogy-LogViewer/Analogy.LogViewer.RegexParser/blob/d0b36774f5fb4b5e144bd55a63599421cf7d728d/Analogy.LogViewer.RegexParser/AnalogyRegexParser.cs#L271
This makes my regex not work obviously because it expects the input of the regex to be the content of the whole file and not line by line.
Would it be possible to support this different behavior when executing the regex? I know that the feedback is not the same because by not reading line by line you can't report progress (
messagesHandler.ReportFileReadProgress()
). But we are talking about that not all log files size is 100MB or more.If so I could lend a hand with a PR if needed.
Thank you.