Okay, maybe I have a solution. Edit rsyslog.conf and add the following.
Note that I did NOT remove local0 from also going to /var/log/messages. For instance, I did not add the following:
It is bad practice to allow messages to go to two logs?
I now log this way:
openlog('myapplication', LOG_NDELAY, LOG_LOCAL0);
syslog(LOG_INFO, "Log to myapplication LOG_LOCAL0");
I guess I am good, but if anything sticks out as being wrong, please advise.