fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

Very often I need to review some logs of a given service.

I've found that is the perfect tool for analyse them. This is what I'm using:

- Occur (M-s o). Ask for a regexp and opens a new buffer with the matching lines. You can click on those lines

- `highlight-lines-matching-regexp`. This will mark in the buffer the lines. This helps a lot visualizing the important events.

- `flush-lines`: Delete all the lines that matches a regexp. To remove lines that are not adding any value

WλGMI

@robjperez I have an eerily similar workflow

I also use `keep-lines` which is the opposite of `flush-lines`

I used to use `grep -C n` to get n lines of context before and after each regex match, but I just now realise M-x occur takes a prefix argument equivalent to `grep -C n`!