Simplify the debugging code
This commit is contained in:
parent
acde8330cb
commit
974fa9b726
1 changed files with 7 additions and 11 deletions
|
@ -491,17 +491,6 @@ if __name__ == "__main__":
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
if "DEBUG" in os.environ:
|
|
||||||
log.setLevel(logging.DEBUG)
|
|
||||||
else:
|
|
||||||
log.setLevel(logging.INFO)
|
|
||||||
|
|
||||||
log.info("Booting...")
|
|
||||||
log.debug("Debug enabled.")
|
|
||||||
|
|
||||||
sw_name = "s1"
|
|
||||||
controller = L2Controller(sw_name)
|
|
||||||
|
|
||||||
controller.commandline()
|
controller.commandline()
|
||||||
if controller.args.debug:
|
if controller.args.debug:
|
||||||
log.setLevel(logging.DEBUG)
|
log.setLevel(logging.DEBUG)
|
||||||
|
@ -510,5 +499,12 @@ if __name__ == "__main__":
|
||||||
else:
|
else:
|
||||||
log.setLevel(logging.WARNING)
|
log.setLevel(logging.WARNING)
|
||||||
|
|
||||||
|
log.info("Booting...")
|
||||||
|
log.debug("Debug enabled.")
|
||||||
|
|
||||||
|
sw_name = "s1"
|
||||||
|
controller = L2Controller(sw_name)
|
||||||
|
|
||||||
|
|
||||||
controller.config()
|
controller.config()
|
||||||
controller.run_cpu_port_loop()
|
controller.run_cpu_port_loop()
|
||||||
|
|
Loading…
Reference in a new issue