Hi

 

How can I avoid line breaks in syslog-ng when it is configured using pipe

 

destination d_mssql {

        pipe("/tmp/mssql.syslog-ng.pipe" flags(no-multi-line)

    template("INSERT INTO logs(datetime,host,program,pid,message)VALUES('$R_DATE','$HOST','$PROGRAM','$PID','$MSGONLY');")

    template-escape(yes));

};

 

log {

     source(src);

     filter(f_debug);

     destination(d_mssql);

};

 

 

Then I have a script reading the pipe

 

if [ -e /tmp/mssql.syslog-ng.pipe ]; then

       while [ -e /tmp/mssql.syslog-ng.pipe ]

                do

                       isql -v MSTEST  "sa" "password" < /tmp/mssql.syslog-ng.pipe

 

                done

else

        mkfifo /tmp/mssql.syslog-ng.pipe

fi

 

Problem is the sql query is getting broken down in 3 lines

 

 

KP