Hi,
I am trying to print user space messages to the syslog, but the syslog isn't showing up. Am i missing something?
syslog.conf is below:
root@arago:~# cd /etc/
root@arago:/etc# cat syslog.conf
DESTINATION="buffer" # log destinations (buffer file remote)
MARKINT=20 # interval between --mark-- entries [min]
REDUCE=no # reduced-size logging
BUFFERSIZE=64 # buffer: size of circular buffer [kByte]
LOGFILE=/var/log/messages # file: where to log
ROTATESIZE=32 # file: rotate log if grown beyond X [kByte] (busybox 1.2+)
ROTATEGENS=1 # file: keep X generations of rotated logs (busybox 1.2+)
REMOTE=loghost:514 # remote: where to log
FOREGROUND=no # run in foreground (don't use!)
root@arago:/etc#
After the follwing userspace code has run, the directory has no message file;
In user space I am running this code:
printf("trying sample syslog\n");
openlog ("MyProgram", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL0);
syslog (LOG_INFO, "Program started by User %d", getuid ());
syslog (LOG_ERR, "Ouch an ERROR!");
closelog ();
root@arago:/# cd var/log/
root@arago:/var/volatile/log# ls -l
-rw-r--r-- 1 root root 0 Jan 1 1970 lastlog
-rw-rw-r-- 1 root root 0 Jan 1 1970 wtmp
root@arago:/var/volatile/log#