Simplify the debugging code

This commit is contained in:
Nico Schottelius 2019-03-25 14:32:08 +01:00
parent acde8330cb
commit 974fa9b726
1 changed files with 7 additions and 11 deletions

View File

@ -491,17 +491,6 @@ if __name__ == "__main__":
import sys
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()
if controller.args.debug:
log.setLevel(logging.DEBUG)
@ -510,5 +499,12 @@ if __name__ == "__main__":
else:
log.setLevel(logging.WARNING)
log.info("Booting...")
log.debug("Debug enabled.")
sw_name = "s1"
controller = L2Controller(sw_name)
controller.config()
controller.run_cpu_port_loop()