1
answer

I am fairly new to nxlog. I am looking for a help to complete my task. How do i drop the log message based on log levels (severity). The incoming log messages have different log levels (debug, info, warning, error, critical).
For example, If i set severity as warning, the nxlog should drop info and debug log messages. Please provide some examples of nxlog.conf to make use of it.

Thanks for the help in advance.

AskedFebruary 29, 2016 - 12:53pm

Answer (1)

The exact configuration depends whether the logs are already parsed or not. See here on how to filter using drop().

Comments (1)

  • arun.dharan's picture

    Thanks for the reply. The logs are not parsed. More over I have tried the example that you have given but the nxlog-ce throws error that =~ is unexpected. Please provide me some inputs to get this working. One more query, Is SeverityValue and SyslogSeverityValue used to fliter the log based on seveirty of those logs ?  Because when i tried to use if($SeverityValue < 2), the nxlog.conf reflects with empty space and nxlog-ce thorws syntax error.

    Thanks in advance.