mutilog via fifo
richard lucassen <[email protected]> Fri, 1 Aug 2008 17:15:22 +0200
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Organization | XAQ Systems |
| Message-ID | <[email protected]> |
Hello list, I have a program, "elhttp" (a simple proxy-server) which is started trough tcpserver. The program has the possibility to write loginfo to a file, but I want to use multilog. There are many ways to do this of course. Problem is, that when I use /dev/stdout as file to write to in the run file: # cat run #!/bin/sh exec 2>&1 exec /usr/local/bin/setuidgid nobody /usr/local/bin/tcpserver -vDRHl0 \ -c100 0 8088 /usr/local/bin/elhttp 0 0.0.0.0 0.0.0.0 "/dev/stdout" 1 then multilog only receives the tcpserver messages. As a workaround for this I can write to a fifo and let multilog pick it up: # cat run #!/bin/sh exec 2>&1 exec /usr/local/bin/setuidgid nobody /usr/local/bin/tcpserver -vDRHl0 \ -c100 0 8088 /usr/local/bin/elhttp 0 0.0.0.0 0.0.0.0 \ "/usr/local/elhttp/fifo" 1 # cat log/run #!/bin/sh exec < /usr/local/elhttp/fifo exec 2>&1 exec /usr/local/bin/setuidgid qftplog /usr/local/bin/multilog t s1048576 ./main Is this a good solution or is this a dirty way to log to multilog? R. -- ___________________________________________________________________ It is better to remain silent and be thought a fool, than to speak aloud and remove all doubt. +------------------------------------------------------------------+ | Richard Lucassen, Utrecht | | Public key and email address: | | http://www.lucassen.org/mail-pubkey.html | +------------------------------------------------------------------+