1

When doing an error analysis with a log file it often happens that I don't know in advance what I am interested in, but want to go the other way: I look at the logfile, and want to remove uninteresting logfile lines with common messages consecutively until only the interesting stuff is left. E.g. I first want to remove all messages containing "INFO", then all log messages containing a specific very common warning. In the rest there is a common error message which is uncritical, so I want to remove this as well. And so forth, until I get to the meat. Is there anything that supports this process? Common logfile viewers seem to only support highlighting stuff, which isn't too helpful if I don't know the problem in advance.

Preferably the process should work as follows: The logfile is displayed, I can scroll around, and when ever I identify a common pattern I can select it via mouse and hide everything that contains that pattern with one click.

  • 3
    Given that log files are usually ASCII you could look at editors that (1) can handle large files and (2) have good macro capabilities. You then e.g. write a macro "Remove all lines containing [selected text]" and execute that while investigating. – Jan Doggen Aug 26 '15 at 9:16
  • It would also help if you could mention what OS this tool should run on: Linux? Mac OS(X)? Windows? There might be solutions not available for all platforms. – Izzy Aug 26 '15 at 9:29
  • @Izzy If there are solutions that run only on some platforms, I could adapt. So I'd rather make it general. – Hans-Peter Störr Aug 26 '15 at 9:38
  • 1
    OK, understood. You might wish to include that with your question (you can always edit it) – something like "preferably for X, but other platforms are accepted as well". At SR, we prefer to focus :) – Izzy Aug 26 '15 at 9:42
  • @hstoerr When you say remove, you mean you'd like to filter out lines containing a specific string? As per your example, you start with a full log file, then you filter out lines containing "INFO", then you filter out even more lines by adding another filtering string in a logical AND with the previous one, etc.? – mguassa Aug 26 '15 at 19:19
1

The LogExpert log file viewer for Windows allows you to highlight lines matching regular expressions, which I use to dim out uninteresting lines that match the expression.

It also has a Filter view which has an Invert Match feature, allowing you to show all lines except ones which match certain expressions.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.