On Tue, 2008-03-18 at 15:38 +0100, JUNG, Christian wrote:
Hi Andrea,
in my opinion the best way would be to use the "program" destination. There you could call a java-application which reads the log from standard input and puts the messages in the java-based log system:
destination java_log_system { program("/path/to/java-connector" template("<$PRI>$DATE $HOST $MSG\n")); };
log { source(src); destination(java_log_system); };
With named pipes you've got the problem, that they won't block after the first read anymore (that's the way they behave under Linux). So your app would use a lot of CPU-cycles for nothing.
syslog-ng will restart your app if it receives a HUP signal.
I would use UNIX domain socket instead. Then your process is completely in its own control and not in syslog-ng's. -- Bazsi