[Linux] syslog
successgo opened this issue · comments
The manual: man syslog
.
Minimal demo
#include <syslog.h>
int
main(void)
{
openlog("gdcapp", LOG_PID, LOG_USER);
syslog(LOG_INFO, "%s", "This is an info message.");
return 0;
}
Open a terminal window and issue below command:
sudo tail -f /var/log/syslog
then compile the program and execute it.
Know more
From wiki:
https://en.wikipedia.org/wiki/Syslog
https://en.wikipedia.org/wiki/Rsyslog
From rfc histories: