Suppress logs in openWRT

What is the best option to filter some kind of logs Im getting spam of?

Something like: logread | grep -v the_word_you_want_to_avoid

1 Like

I mean not getting spam logs in logd

You'd need to be more specific.

hm, it depends what kind of spam log you get. try:

  • stop the application generating spam log,
  • set the application log level lower,
  • and so on depending on your source of problem actor,
  • use syslog-ng as replacement syslog server and filter out unwanted logs - which will hide spamming log entries but will not stop the cause

but if you could hint us what are the spamming entries would be much easier

Lot of beacon requests and responses from specific device that should be static anyway.
so I just want to ignore those specific beacon logs.

It is easier if you copy and past the log lines here that you are talking about if you want meaningful help.

BEACON-RESP-RX xx:xx:xx:xx:xx:xx

it doesn't really matter... just remove specific lines from log.

Do you want to "remove" the lines from the log?
Or do you want to "not write" the lines to the log?

The first case is easy, the second case requires a specific solution: you need to know exactly which lines, in order to find which program is generating them, then try to configure that program to not produce those lines.

just remove it from the log...
in the past I used rsyslog, but i'm not sure if it working anymore

The whole line.

You haven’t even mentioned what service that is making the log output.

syslog-ng made the job

BEACON-RESP-RX xx:xx:xx:xx:xx:xx

I mean the whole log line also with the source service.
I doubt this log line came from the syslog-ng service, that only print the line.

Usually these kind of logs can be suppressed by changing the service verbosity or handle the reason for the log.

Sitting and manually remove a never ending log lines is a way to do it but then what?

1 Like