Split messages from firewall and OpenVPN into separate log files

I wonder if it would make sense to split the different messages (Firewall, OpenVPN, IPsec, etc.) into different log files.

When tailing log files via the shell, I know I can use grep to filter out unimportant stuff. An example to check on firewall messages:

tail -f /var/log/messages | grep kernel

However, if I wanted to check /var/log/messages for something where I don’t exactly know what I’m looking for (at least not related to Firewall or OpenVPN) because I have a problem with something else, this would be more difficult at the moment.

It would be easier if e.g. Firewall messages would be in /var/log/firewall, and OpenVPN messages in /var/log/openvpn, so that /var/log/messages contained the rest.

Hope my explanation make sense =)

The System Logs do that!

Here is the same as grep kernel


and here is openvpn:

2 Likes

Yes, but a) I don’t want to use the GUI and b) I only want to see everything else, neither kernel nor openvpn (or ipsec) messages.