Search code examples
syslog-ng

Exclude some text from log output with syslog-ng


i have log message

"2020-11-06T14:28:19.171900+0000 Host-9999 1889 1889 DBG some part of the log"

Is it possible to filter messages like this with syslog-ng functionality to have such output

"DBG some part of the log"

Basically i need to exclude date, host, pid, pid in every log message.


Solution

  • i raised it with rewrite function, and with regex

    rewrite test{
    subst("^.{0,54}", " ", value("MSG"));
    };