vty script ad 'dq'

Add a pseudo level to the vty script to hush some of
the debug level logging
This commit is contained in:
Keith Whyte 2023-01-04 23:19:24 +01:00
parent 87e8738104
commit 1cbc1bdf88

View file

@ -18,12 +18,17 @@
# Requires expect, available on most distributions.
set host localhost
set quiet 0
set vty [lindex $argv 0]
set lf [lindex $argv 1]
set all [lindex $argv 2]
set h [lindex $argv 3]
if { $lf < 0 } { set lf 1 }
if { $all < 0 } { set all notice }
if { $all == "dq" } {
set all debug
set quiet 1
}
if { $h > 0 } { set host 127.0.0.2 }
switch $vty {
@ -117,6 +122,33 @@ switch $vty {
expect "#"
}
}
if { $quiet==1 } {
# These levels are very noisy at debug:
send "logging level lctrl info\r"
expect "#"
send "logging level lmi info\r"
expect "#"
send "logging level linp info\r"
expect "#"
send "logging level lgsup notice\r"
expect "#"
send "logging level lsccp info\r"
expect "#"
send "logging level lss7 info\r"
expect "#"
send "logging level lm3ua info\r"
expect "#"
send "logging level lsua info\r"
expect "#"
switch $vty {
msc {
send "logging level smpp info\r"
expect "#"
}
}
}
send "logging filter all $lf\r"
expect "#"
interact