Hi All,

 

How can I use a function in double quote? I want to record the IP address of the syslog-ng server.

Since there's no available macro that represent the IP of syslog-ng server(only have macros indicate where the message sent to syslog-ng server,like $HOST). So I want to use ip() function and record it to database.

 

The configuration part is:

 

            columns(  "datetime varchar2(24)",

                                "server_ip varchar2(24)",

                                "host varchar2(32)",

                                ...)

            values(     "${R_YEAR}-${R_MONTH}-${R_DAY} ${R_HOUR}:${R_MIN}:${R_SEC}",

                                "ip()",

                                "$HOST",

                                ...)


When I started syslog-ng,it gave error message that said expecting double quotes.

How can I use a function in double quotes? Or are there any other ways to get the syslog-ng server IP address and record them?

Thanks,

Henry