how to record custom alert in redhat 8

Latest response

Hi all,
i'm having some trouble on a question regarding rsyslog
below are the question
As user1 with sudo on server1 , write the message "This is $LOGNAME adding this marker on $(date)" to /var/log/messages file. Ensure that variable and command expansion work. verify the entry in the file.
how do i perform this ?

Responses