I am running a Debian Jessie server and want to log some custom messages using syslog. I added the following line to rsyslog.conf local0.* -/var/log/mojosound.log
When I use the syslog function in my c program with this syntax:
syslog(LOG_LOCAL0, "Test Message");
I see the mojosound.log file created and updated each time I run the sample program. However, if I try and add a priority to the command, the message goes nowhere that I can find.
int priority = LOG_MAKEPRI(LOG_LOCAL0, LOG_INFO);
syslog(pritority, "Test Message");
There are no other references to local0 in the conf file and no other rules that look like they should matter.
I am thinking that it must be an issue with my conf file but I cannot find anything in the rsyslog documentation that would point to what it is.
Any ideas?