Posts
read more
Logging to the System Logger in Bash
If you are writing a shell script and want any messages to appear in the system logger you can just use the logger command to do this.
Here is an example on my Slackware system:
$ logger -t TEST "This is a test message"$ cat /var/log/messagescat: /var/log/messages: Permission denied$ su -Password:# cat /var/log/messagesAug 23 17:44:47 slackbook TEST: This is a test message