Community discussions

MikroTik App
Member Candidate
Member Candidate
Topic Author
Posts: 159
Joined: Mon Mar 17, 2014 11:30 am
Location: Amsterdam

How to clear a logging action buffer?

Thu Oct 13, 2016 10:13 am

Given a logging action buffer in memory, how do I clear it?

For instance this logging action buffer `failedauth`:
/system logging action add memory-lines=1000 memory-stop-on-full=no name=failedauth target=memory
/system logging add action=failedauth disabled=no prefix="" topics=critical,system,error
Somehow this trick does not work in RouterOS 6.37.1 to clear the logging action buffer:
  :local logBuffer "failedauth";
  :local lines;
  /system logging action {
     :set lines [get ($logBuffer) memory-lines];
     set ($logBuffer) memory-lines 1;
     set ($logBuffer) memory-lines $lines;
  :put "$lines"
The trick is originally by ... -routeros/ and likely worked in the past.

Who is online

Users browsing this forum: No registered users and 24 guests