use the singleton logger object

There was no need for each test file to have its own logger.
diff --git a/tests/detailed_contr_sw_messages.py b/tests/detailed_contr_sw_messages.py
index d45935d..b13659d 100644
--- a/tests/detailed_contr_sw_messages.py
+++ b/tests/detailed_contr_sw_messages.py
@@ -22,7 +22,6 @@
 from FuncUtils import *
 
 cs_port_map = None
-cs_logger = None
 cs_config = None
 
 def test_set_init(config):
@@ -31,11 +30,8 @@
     basic.test_set_init(config)
 
     global cs_port_map
-    global cs_logger
     global cs_config
 
-    cs_logger = logging.getLogger("Detailed controller to switch messages")
-    cs_logger.info("Initializing test set")
     cs_port_map = config["port_map"]
     cs_config = config
 
@@ -47,18 +43,18 @@
     
     def runTest(self):
         
-        cs_logger.info("Running Overlap_Checking test")
+        logging.info("Running Overlap_Checking test")
        
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear Switch State
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting two overlapping flows")
-        cs_logger.info("Expecting switch to return an error")
+        logging.info("Inserting two overlapping flows")
+        logging.info("Expecting switch to return an error")
 
         #Insert a flow F with wildcarded all fields
         (pkt,match) = Wildcard_All(self,of_ports)
@@ -107,18 +103,18 @@
     
     def runTest(self):
      
-        cs_logger.info("Running No_Overlap_Checking test")
+        logging.info("Running No_Overlap_Checking test")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear Switch State
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting two overlapping flows")
-        cs_logger.info("Expecting switch to insert the flows without generating errors")
+        logging.info("Inserting two overlapping flows")
+        logging.info("Expecting switch to insert the flows without generating errors")
 
         #Build a flow F with wildcarded all fields.
         (pkt,match) = Wildcard_All(self,of_ports)
@@ -139,18 +135,18 @@
 
     def runTest(self):
         
-        cs_logger.info("Running Identical_Flows test ")
+        logging.info("Running Identical_Flows test ")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting two identical flows one by one")
-        cs_logger.info("Expecting switch to overwrite the first flow and clear the counters associated with it ")
+        logging.info("Inserting two identical flows one by one")
+        logging.info("Expecting switch to overwrite the first flow and clear the counters associated with it ")
         
         # Create and add flow-1, check on dataplane it is active.
         (pkt,match) = Wildcard_All(self,of_ports)
@@ -180,18 +176,18 @@
 
     def runTest(self):
 
-        cs_logger.info("Running Emergency_Flow_Timeout test")
+        logging.info("Running Emergency_Flow_Timeout test")
         
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting an emergency flow with timeout values")
-        cs_logger.info("Expecting switch to generate error ")
+        logging.info("Inserting an emergency flow with timeout values")
+        logging.info("Expecting switch to generate error ")
         
         #Insert an emergency flow 
         pkt = simple_tcp_packet()
@@ -209,7 +205,7 @@
         act.port = of_ports[1]
         
         request.actions.add(act)
-        cs_logger.info("Inserting flow")
+        logging.info("Inserting flow")
         rv = self.controller.message_send(request)
         self.assertTrue(rv != -1, "Flow addition did not fail.")
 
@@ -232,17 +228,17 @@
     
     def runTest(self):
         
-        cs_logger.info("Running Missing_Modify_Add test")
+        logging.info("Running Missing_Modify_Add test")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
-        cs_logger.info("Inserting a flow-modify that does not match an existing flow")
-        cs_logger.info("Expecting flow to get added i.e OFPFC_MODIFY command should be taken as OFPFC_ADD ")
+        logging.info("Inserting a flow-modify that does not match an existing flow")
+        logging.info("Expecting flow to get added i.e OFPFC_MODIFY command should be taken as OFPFC_ADD ")
 
         #Clear Switch State
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
         #Generate a flow-mod,command OFPC_MODIFY 
@@ -257,7 +253,7 @@
         act3.port = of_ports[1]
         self.assertTrue(request.actions.add(act3), "could not add action")
 
-        cs_logger.info("Inserting flow")
+        logging.info("Inserting flow")
         rv = self.controller.message_send(request)
         self.assertTrue(rv != -1, "Error installing flow mod")
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed") 
@@ -272,18 +268,18 @@
     
     def runTest(self):
         
-        cs_logger.info("Running Modify_Action test ")
+        logging.info("Running Modify_Action test ")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting a Flow and incrementing flow counters. Modifying the flow action")
-        cs_logger.info("Expecting the flow action to be modified , but the flow-counters should be preserved")
+        logging.info("Inserting a Flow and incrementing flow counters. Modifying the flow action")
+        logging.info("Expecting the flow action to be modified , but the flow-counters should be preserved")
            
         #Create and add flow-1 Match on all, except one wildcarded (src adddress).Action A , output to of_port[1]
         (pkt,match) = Match_All_Except_Source_Address(self,of_ports)
@@ -310,18 +306,18 @@
 
     def runTest(self):
         
-        cs_logger.info("Running Strict_Modify_Action test")
+        logging.info("Running Strict_Modify_Action test")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting Flows and incrementing flow counters. Strict Modify the flow action ")
-        cs_logger.info("Expecting the flow action to be modified , but the flow-counters should be preserved")
+        logging.info("Inserting Flows and incrementing flow counters. Strict Modify the flow action ")
+        logging.info("Expecting the flow action to be modified , but the flow-counters should be preserved")
         
         #Create and add flow-1 Match on all, except one wildcarded (src adddress).Action A
         (pkt,match) = Match_All_Except_Source_Address(self,of_ports,priority=100)
@@ -354,18 +350,18 @@
     
     def runTest(self):
         
-        cs_logger.info("Delete_NonExisting_Flow test begins")
+        logging.info("Delete_NonExisting_Flow test begins")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Deleting a non-existing flow")
-        cs_logger.info("Expecting switch to ignore the command , without generating errors")
+        logging.info("Deleting a non-existing flow")
+        logging.info("Expecting switch to ignore the command , without generating errors")
 
         # Issue a delete command 
         msg = message.flow_mod()
@@ -390,19 +386,19 @@
 
     def runTest(self):
 
-        cs_logger.info("Running Send_Flow_Rem test ")
+        logging.info("Running Send_Flow_Rem test ")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear swicth state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting flows F1 and F2 without and with send_flow_removed_message flag set ")
-        cs_logger.info("Deleting the flows")
-        cs_logger.info("Expecting flow removed message only for F2")
+        logging.info("Inserting flows F1 and F2 without and with send_flow_removed_message flag set ")
+        logging.info("Deleting the flows")
+        logging.info("Expecting flow removed message only for F2")
 
         # Insert flow-1 with F without OFPFF_SEND_FLOW_REM flag set.
         (pkt,match) = Wildcard_All_Except_Ingress(self,of_ports)
@@ -432,7 +428,7 @@
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         # Delete the flow-2
-        rc2 = delete_all_flows(self.controller, cs_logger)
+        rc2 = delete_all_flows(self.controller)
         self.assertEqual(rc2, 0, "Failed to delete all flows")
 
         # Verify flow removed message is generated for the FLOW-2
@@ -450,17 +446,17 @@
 
     def runTest(self):
 
-        cs_logger.info("Running Delete_Emer_Flow")
+        logging.info("Running Delete_Emer_Flow")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         
         #Clear switch state        
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting a emergency flow with send_flow_removed flag set")
-        cs_logger.info("Expecting no flow_removed_message on the deletion of the emergency flow")
+        logging.info("Inserting a emergency flow with send_flow_removed flag set")
+        logging.info("Expecting no flow_removed_message on the deletion of the emergency flow")
         
         # Insert a flow with emergency bit set.
         pkt = simple_tcp_packet()
@@ -493,18 +489,18 @@
 
     def runTest(self):
         
-        cs_logger.info("Strict_Vs_Nonstrict test begins")
+        logging.info("Strict_Vs_Nonstrict test begins")
         
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
         
-        cs_logger.info("Inserting a flow with exact match")
-        cs_logger.info("Issue Strict Delete command , verify it gets deleted")     
+        logging.info("Inserting a flow with exact match")
+        logging.info("Issue Strict Delete command , verify it gets deleted")     
         
         #Insert F with an exact Match 
         (pkt,match) = Exact_Match(self,of_ports)  
@@ -514,9 +510,9 @@
         Strict_Delete(self,match)
         Verify_TableStats(self,active_entries=0)
 
-        cs_logger.info("Inserting two overlapping flows")
-        cs_logger.info("Issue Strict Delete command ")
-        cs_logger.info("Expecting only one flow gets deleted , because Strict Delete matches on wildcards as well")     
+        logging.info("Inserting two overlapping flows")
+        logging.info("Issue Strict Delete command ")
+        logging.info("Expecting only one flow gets deleted , because Strict Delete matches on wildcards as well")     
         
         #Insert Flow T with match on all , except one wildcarded ( say src adddress ). 
         (pkt,match) = Match_All_Except_Source_Address(self,of_ports)
@@ -529,9 +525,9 @@
         Strict_Delete(self,match1)
         Verify_TableStats(self,active_entries=1) 
 
-        cs_logger.info("Inserting two overlapping flows")
-        cs_logger.info("Issue Non-Strict Delete command ")
-        cs_logger.info("Expecting both the flow gets deleted , because wildcards are active")    
+        logging.info("Inserting two overlapping flows")
+        logging.info("Issue Non-Strict Delete command ")
+        logging.info("Expecting both the flow gets deleted , because wildcards are active")    
 
         #Insert T and T' again . 
         (pkt,match) = Match_All_Except_Source_Address(self,of_ports)
@@ -542,9 +538,9 @@
         NonStrict_Delete(self,match1)
         Verify_TableStats(self,active_entries=0)
 
-        cs_logger.info("Inserting three overlapping flows with different priorities")
-        cs_logger.info("Issue Non-Strict Delete command ")
-        cs_logger.info("Expecting all the flows to get deleted")  
+        logging.info("Inserting three overlapping flows with different priorities")
+        logging.info("Issue Non-Strict Delete command ")
+        logging.info("Expecting all the flows to get deleted")  
   
         #Insert T , add Priority P (say 100 ) 
         (pkt,match) = Match_All_Except_Source_Address(self,of_ports,priority=100)
@@ -560,9 +556,9 @@
         NonStrict_Delete(self,match1,priority=200)
         Verify_TableStats(self,active_entries=0)
 
-        cs_logger.info("Inserting three overlapping flows with different priorities")
-        cs_logger.info("Issue Strict Delete command ")
-        cs_logger.info("Expecting only one to get deleted because here priorities & wildcards are being matched")  
+        logging.info("Inserting three overlapping flows with different priorities")
+        logging.info("Issue Strict Delete command ")
+        logging.info("Expecting only one to get deleted because here priorities & wildcards are being matched")  
 
         #Issue Strict-Delete and verify only T'' gets deleted. 
         (pkt,match) = Match_All_Except_Source_Address(self,of_ports,priority=100)
@@ -580,19 +576,19 @@
 
     def runTest(self):
         
-        cs_logger.info("Outport1 test begins")
+        logging.info("Outport1 test begins")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting a flow with output action --> of_port[1]")
-        cs_logger.info("Deleting the flow but with out_port set to of_port[2]")
-        cs_logger.info("Expecting switch to filter the delete command")
+        logging.info("Inserting a flow with output action --> of_port[1]")
+        logging.info("Deleting the flow but with out_port set to of_port[2]")
+        logging.info("Expecting switch to filter the delete command")
         
         #Build and send Flow-1 with action output to of_port[1]
         (pkt,match) = Wildcard_All_Except_Ingress(self,of_ports)
@@ -614,8 +610,8 @@
         # Verify flow will not get deleted, active_entries in table_stats_request = 1
         Verify_TableStats(self,active_entries=1)
 
-        cs_logger.info("Deleting the flow with out_port set to of_port[1]")
-        cs_logger.info("Expecting switch to delete the flow")
+        logging.info("Deleting the flow with out_port set to of_port[1]")
+        logging.info("Expecting switch to delete the flow")
 
         #Send Delete command with contraint out_port = of_ports[1]
         msg7 = message.flow_mod()
@@ -638,18 +634,18 @@
 
     def runTest(self):
         
-        cs_logger.info("Running Idle_Timeout test ")
+        logging.info("Running Idle_Timeout test ")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
         
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting flow entry with idle_timeout set. Also send_flow_removed_message flag set")
-        cs_logger.info("Expecting the flow entry to delete with given idle_timeout")
+        logging.info("Inserting flow entry with idle_timeout set. Also send_flow_removed_message flag set")
+        logging.info("Expecting the flow entry to delete with given idle_timeout")
 
         #Insert a flow entry with idle_timeout=1.Send_Flow_Rem flag set
         msg9 = message.flow_mod()
@@ -682,18 +678,18 @@
 
     def runTest(self):
         
-        cs_logger.info("Running Outport2 test ")
+        logging.info("Running Outport2 test ")
 
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Adding and modifying flow with out_port fields set")
-        cs_logger.info("Expecting switch to ignore out_port")
+        logging.info("Adding and modifying flow with out_port fields set")
+        logging.info("Expecting switch to ignore out_port")
 
         # Create and add flow-1,Action A ,output to port of_port[1], out_port set to of_ports[2]
         (pkt,match) = Wildcard_All_Except_Ingress(self,of_ports)
@@ -722,18 +718,18 @@
 
     def runTest(self):
 
-        cs_logger.info("Running Hard_Timeout test ")
+        logging.info("Running Hard_Timeout test ")
         
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting flow entry with hard_timeout set. Also send_flow_removed_message flag set")
-        cs_logger.info("Expecting the flow entry to delete with given hard_timeout")
+        logging.info("Inserting flow entry with hard_timeout set. Also send_flow_removed_message flag set")
+        logging.info("Expecting the flow entry to delete with given hard_timeout")
 
         # Insert a flow entry with hardtimeout=1 and send_flow_removed flag set
         msg9 = message.flow_mod()
@@ -769,18 +765,18 @@
     
     def runTest(self):
 
-        cs_logger.info("Running Flow_Timeout test ")
+        logging.info("Running Flow_Timeout test ")
         
         of_ports = cs_port_map.keys()
         of_ports.sort()
         self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
 
         #Clear switch state
-        rc = delete_all_flows(self.controller, cs_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        cs_logger.info("Inserting flow entry with hard_timeout set and send_flow_removed_message flag not set")
-        cs_logger.info("Expecting the flow entry to delete, but no flow removed message")
+        logging.info("Inserting flow entry with hard_timeout set and send_flow_removed_message flag not set")
+        logging.info("Expecting the flow entry to delete, but no flow removed message")
 
         # Insert a flow with hard_timeout = 1 but no Send_Flow_Rem flag set
         pkt = simple_tcp_packet()