- So our rsyslog configuration is in etc/rsyslog.conf.
And we need to add a line,
regardless of what we already have,
we can add another line to log the same information.
So we want all messages, all priorities, that's easy.
*.* for all facilities, all priorities.
And we write that to var/log/all.
There was one more requirement,
and this requirement is that we need the imjournal module.
There we go, imjournal is already there.
So further requirement that system d, journal d,
is used as log inputs.
We don't have to do anything.
This rsyslog has been configured to do so automatically.
Next systemctl restart rsyslog to restart
so that it's picking it up.
And now we need to create the logrotate.
So how do we do that?
Well, let's get a little bit of inspiration
through etc/logrotate.d
and just pick out any of these,
httpd for instance.
And there we can see how it works.
So we have var/log name of the file
and then we have the parameters between square brackets.
So if we combine that
with what we see in etc/logrotate.conf,
there we have the parameters.
So I need these weekly
and this rotate six in inner configuration.
That looks a little bit like what we see here.
Now the easy way would be to use etc/logrotate.d.
And let me copy this httpd to all,
and let me edit the all file.
And in this all file, I am going to configure var/log/all.
And I want to set that to daily and to rotate six.
And everything else can be deleted.
And now it will be picked up the next time
that logrotate is going to run.
So that's how it works.