From 1cbc1bdf886e3251b0deadb5185331b54c33b167 Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Wed, 4 Jan 2023 23:19:24 +0100 Subject: [PATCH] vty script ad 'dq' Add a pseudo level to the vty script to hush some of the debug level logging --- modules/rhizo_base/files/vty | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/modules/rhizo_base/files/vty b/modules/rhizo_base/files/vty index 95eb8e0..74dc12a 100755 --- a/modules/rhizo_base/files/vty +++ b/modules/rhizo_base/files/vty @@ -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