[syslog-ng] Syslog-ng 3.4.5 support question

Fabien Wernli wernli at in2p3.fr
Mon Feb 8 07:02:33 UTC 2021


Hi Mukesh,

On Sun, Feb 07, 2021 at 06:12:00PM +0530, mukesh kumar wrote:
>           <value name="requesttime">${tmp.year}-$(if ("${tmp.month}"
> == "Jan") 01 $(if ("${tmp.month}" == "jan") 01 $(if ("${tmp.month}" ==
> "Feb") 02 $(if ("${tmp.month}" == "feb") 02 $(if ("${tmp.month}" ==
> "Mar") 03 $(if ("${tmp.month}" == "mar") 03 $(if ("${tmp.month}" ==
> "Apr") 04 $(if ("${tmp.month}" == "apr") 04 $(if ("${tmp.month}" ==
> "May") 05 $(if ("${tmp.month}" == "may") 05 $(if ("${tmp.month}" ==
> "Jun") 06 $(if ("${tmp.month}" == "jun") 06 $(if ("${tmp.month}" ==
> "Jul") 07 $(if ("${tmp.month}" == "jul") 07 $(if ("${tmp.month}" ==
> "Aug") 08 $(if ("${tmp.month}" == "aug") 08 $(if ("${tmp.month}" ==
> "Sep") 09 $(if ("${tmp.month}" == "sep") 09 $(if ("${tmp.month}" ==
> "Oct") 10 $(if ("${tmp.month}" == "oct") 10 $(if ("${tmp.month}" ==
> "Nov") 11 $(if ("${tmp.month}" == "nov") 11 $(if ("${tmp.month}" ==
> "Dec") 12 $(if ("${tmp.month}" == "dec") 12
> ${tmp.month}))))))))))))))))))))))))-${tmp.day} ${tmp.time}</value>
>         </values>

Did you consider the excellent date-parser() which would *probably* help in
this situation ?



More information about the syslog-ng mailing list