Okay, so apart from systemd Journald, you still need to know a bit
about R syslog as well, because on many distributions you'll still find it.
R syslog D is a service that works with facility, priority and destination.
The facility is the item that R syslogd should be looking for.
The priority indicates the severity of the log event, and the
destination defines the location where the message should be written to.
And in most cases, the destination would be a file.
Let me show you what the configuration looks like so that you know where to find your log information on an R syslog system.
To start it, I'm using sudo systemctl status on r syslog and that's
showing that our syslog is active and it is running, and that's good.
Then I need sudo vim on etcr
syslog conf that's the main configuration file.
Now, there is a section about modules that you can easily skip. You need to be looking for the rules, and these rules are right here.
So what do we see? We see here the line that explains that everything that is related
to the facility with all priorities will be sent to the dev console. That's for your kernel.
Now more interesting is the line that we have here.
Star.info all facilities that log with the priority of info, but not mill and not
authprif and not cron is sent to Varlock messages authpriv, that is authentication related is
sent to Varlock secure, and so on and so on and so on.
Now, obviously this is the default configuration on my distribution. You might find something else. The result
will be written to the var log directory where you can see many files have been created.
And I'm going to show you what one of them looks like.
That is the var log messages file on this Centos system. It's the main log file. So I
need sudo less on var log messages. You do need administrator privileges to get access to it.
Uppercase g brings you to the bottom and there you can see all the messages that have been logged.
Now, this is an ordinary file, a text file. So you can
use your usual stuff for text file management to find information.
There is no easy way to show priority of error only if
you want to see priority of error only in a specific file.
You need to tweak the r syslog configuration in order to do so.