Changed to make 'output' the default log level.

This commit is contained in:
Bob Lantz
2011-01-04 17:12:34 -08:00
parent 1ee6fad705
commit 1dcc047624
3 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -198,7 +198,8 @@ class MininetRunner( object ):
if LEVELS[self.options.verbosity] > LEVELS['output']: if LEVELS[self.options.verbosity] > LEVELS['output']:
print ( '*** WARNING: selected verbosity level (%s) will hide CLI ' print ( '*** WARNING: selected verbosity level (%s) will hide CLI '
'output!\n' 'output!\n'
'Please restart Mininet with -v [debug, info, output].' ) 'Please restart Mininet with -v [debug, info, output].'
% self.options.verbosity )
lg.setLogLevel( self.options.verbosity ) lg.setLogLevel( self.options.verbosity )
# validate environment setup # validate environment setup
+1 -1
View File
@@ -18,7 +18,7 @@ LEVELS = { 'debug': logging.DEBUG,
'critical': logging.CRITICAL } 'critical': logging.CRITICAL }
# change this to logging.INFO to get printouts when running unit tests # change this to logging.INFO to get printouts when running unit tests
LOGLEVELDEFAULT = logging.WARNING LOGLEVELDEFAULT = OUTPUT
#default: '%(asctime)s - %(name)s - %(levelname)s - %(message)s' #default: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
LOGMSGFORMAT = '%(message)s' LOGMSGFORMAT = '%(message)s'
+2
View File
@@ -10,6 +10,7 @@ from mininet.node import Host, Controller, ControllerParams
# from mininet.node import KernelSwitch # from mininet.node import KernelSwitch
from mininet.node import UserSwitch, OVSKernelSwitch from mininet.node import UserSwitch, OVSKernelSwitch
from mininet.topo import SingleSwitchTopo, LinearTopo from mininet.topo import SingleSwitchTopo, LinearTopo
from mininet.log import setLogLevel
SWITCHES = { 'user': UserSwitch, SWITCHES = { 'user': UserSwitch,
'ovsk': OVSKernelSwitch, 'ovsk': OVSKernelSwitch,
@@ -56,4 +57,5 @@ class testLinear( unittest.TestCase ):
if __name__ == '__main__': if __name__ == '__main__':
setLogLevel('warning')
unittest.main() unittest.main()