I want to send messages from C program and from Perl script to a file (for example, /var/log/my_log). I don't have access to the syslog daemon configuration, so I think in launch a differente syslog daemon (syslog-ng).
I'm able to send messages from the command line, using
logger command and its
-u option. This log messages are logged on my_log instead of the usual messages file, but I cannot reproduce the same behavior from C or Perl.
The openlog function, apparently, doesn't have any option to specify a socket for logging, or the PID of the log process or something that allows me to send the messages to my own log instead the system log.
Can it be done or is it impossible using