Disable logging for script

The script below will output lines for every single action it takes. Is there a way I can disable log output for just this script? I would prefer not hiding all of the info topic if that can be helped!

date; system info; static dns entry removed by scriptuser
date; system info; static dns entry added by scriptuser


:local topdomain
:local hostname
:local hostip
:set topdomain "foo.com" ;
/ip dhcp-server lease ;
:foreach i in=[find] \
do={  \
    /ip dhcp-server lease ;
        :if ([:len [get $i host-name]] > 0) do={ \
           :set hostname ([get $i host-name] . "." . $topdomain); \
           :set hostip [get $i address]; \
           :put ( $hostname . " : " . $hostip ) ; \
           /ip dns static ;
           :foreach di in=[find] do={ :if ([get $di name] = $hostname) do {/ip dns static remove $di }}
           /ip dns static add name=$hostname address=$hostip
         }  \
};

Only way to turn them off is to disable all system info logs.

I for one would like to see a script option in the logs (not info,script,system) which would allow us to quash the huge number of log lines scripts can generate. :slight_smile:

Script option is already there, but in this particular case log entries are not generated by script, they are system messages that dns entry was removed.

when start script - disable logging for the time script is running, if that solves anything, after finished, enable logging again. it is not very safe, as any other person will be able to perform actions and you wont see them on logs.

you can do that using script you are running :wink:

Really needs to be a way around this, I think, but I’m not developing…

I simply disabled the script and I’ll run it manually if/when needed =(