The logger command can be used to generate syslog entries of any facility and priority. It is a shell command interface to the syslog system log module. It allows users to write messages to the system log from the command line or from a script. The logger command supports several options to specify the facility, priority, tag, message, and other attributes of the log entry. For example, the following command generates a log entry with the facility user and the priority info:
logger -p user.info “This is a test message”
The facility and priority can be any of the values defined in the syslog protocol, such as kern, mail, auth, local0, etc. for the facility, and emerg, alert, crit, err, warn, notice, info, debug, etc. for the priority. The default facility is user and the default priority is notice. The logger command can also read messages from standard input or from a file. For more information, see the logger man page or the logger - Linux man page online. References:
Syslogs in Linux: Understanding Facilities and Levels
What are Syslog Facilities and Levels? - Trend Micro
syslog-ng Open Source Edition 3.30 - Administration Guide
Syslog Logging Guide: Advanced Concepts - CrowdStrike
Submit