Tks for your help.
I make a big mistake.I typed
but I didnt assign the precise path,so other program with the same name was executed
syslog() is easy & convient to use :
use the simplest setting said by "man syslog.conf" *.info /var/log/messages
add functions in your code :
Your message will be recorded to log-file.