Community discussions

 
User avatar
kometchtech
Member Candidate
Member Candidate
Topic Author
Posts: 194
Joined: Sat Jun 15, 2013 4:25 am
Location: Japan
Contact:

I wanted to log output only when the specific processing.

Wed Apr 29, 2015 4:41 pm

Hello, all

Message similar to the following when adding multiple Address address-list the daily Script to exclude specific IP to make sure it is, but in large amounts of output.
/ip firewall address-list
remove [/ip firewall address-list find list=RU]
add address=2.60.0.0/14 list=RU
add address=2.92.0.0/14 list=RU
add address=5.1.48.0/21 list=RU
add address=5.2.32.0/19 list=RU
add address=5.3.0.0/16 list=RU
add address=5.8.0.0/18 list=RU
add address=5.8.64.0/19 list=RU
add address=5.8.160.0/20 list=RU
add address=5.8.176.0/21 list=RU
add address=5.8.192.0/19 list=RU
add address=5.8.224.0/20 list=RU
add address=5.11.64.0/20 list=RU
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin
22:33:41 system,info address list entry added by admin

Log output to stop when this Script is executed, but there was way??

My best regards.
--
Routerboard Users Group JP
http://www.rb-ug.jp/
CCR1009-8G-1S-1S+, RB750Gr3, CRS226-24G-2S+, RB850Gx2, RB960PGS, CRS317-1G-16S+,
RB2011UAS, CRS125-24G-1S, RB962UiGS-5HacT2HnT, CRS212-1G-10S-1S+, RB3011UiAS
 
TomosRider
Member Candidate
Member Candidate
Posts: 202
Joined: Thu Nov 20, 2014 1:51 pm

Re: I wanted to log output only when the specific processing.

Wed Apr 29, 2015 5:13 pm

Not sure i understand, but if you want to ommit logs on your router, you can achieve this by disabling some outputs in system/logging/rules.
 
User avatar
kometchtech
Member Candidate
Member Candidate
Topic Author
Posts: 194
Joined: Sat Jun 15, 2013 4:25 am
Location: Japan
Contact:

Re: I wanted to log output only when the specific processing.

Wed Apr 29, 2015 6:07 pm

Thanks for the reply.

You should do so in this case, exclude info and system?
If the Prefix is in this case how do I specify what?
/system logging
add action=devnull prefix=address topics=!system,!info
My best regards.
Not sure i understand, but if you want to ommit logs on your router, you can achieve this by disabling some outputs in system/logging/rules.
--
Routerboard Users Group JP
http://www.rb-ug.jp/
CCR1009-8G-1S-1S+, RB750Gr3, CRS226-24G-2S+, RB850Gx2, RB960PGS, CRS317-1G-16S+,
RB2011UAS, CRS125-24G-1S, RB962UiGS-5HacT2HnT, CRS212-1G-10S-1S+, RB3011UiAS
 
alexrn
just joined
Posts: 2
Joined: Mon Feb 29, 2016 12:28 pm

Re: I wanted to log output only when the specific processing.

Mon Feb 29, 2016 1:19 pm

I had the same issue, but not found any solution to filter the logs. But I found the solution that we can use inside the script.
# Disable Logging so each add and remove isn't in the system log, we turn it back on at the end
:log debug "Disabling system Logging";
/system logging disable

.... {your code here} ....

# Enable the Logging
:log debug "Enabling system logging";
/system logging enable
 
User avatar
Splash
Member Candidate
Member Candidate
Posts: 151
Joined: Fri Oct 16, 2015 10:09 am
Location: Johannesburg, South Africa

Re: I wanted to log output only when the specific processing.

Mon Feb 29, 2016 2:10 pm

MTCNA, MTCRE, MTCINE, MTCTCE, MTCIPv6E, MTCUME

Who is online

Users browsing this forum: No registered users and 50 guests