i have a c program the code is
setlogmask (LOG_UPTO (LOG_NOTICE));
openlog ("thelog", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
syslog (LOG_NOTICE, "thelog : started by User %d", getuid ());
syslog (LOG_INFO, "thelog: an info is logging");
closelog();
the code is working properly BUT the issue is the log is being logged to the file /var/log/messages , i have /etc/rsyslog.conf no and syslog.conf
I want the logs to be logged to a new file /var/log/thelog.log file
how to fix this issue .