How to send messages to rsyslog in RHEL7/CentOS7?
Posted by Jon Snow on April 23rd 2018 07:53 AM
"logger" command with "-p" option is used to send messages to rsyslog service. Without "-p" option it will send the messages to the facility user with severity notice by default. It is very useful to test the changes to the rsyslog configuration. "-p" - Enter the message into the log with specified priority. Priority may be specified numerically or as a facility level. For example - -p local3.info logs the message as informational in the local3 facility. "tail -1 /path/to/logfile" will display the latest entry of the log file. Lets send messages to rsyslogd that gets recorded in the /var/log/boot.log and /var/log/maillog log file, as shown below: