diff --git a/tests/bsn_ipmask.py b/tests/bsn_ipmask.py
index 489b980..6a4d389 100644
--- a/tests/bsn_ipmask.py
+++ b/tests/bsn_ipmask.py
@@ -14,8 +14,6 @@
 #@var port_map Local copy of the configuration map from OF port
 # numbers to OS interfaces
 im_port_map = None
-#@var im_logger Local logger object
-im_logger = None
 #@var im_config Local copy of global configuration data
 im_config = None
 
@@ -27,11 +25,8 @@
     basic.test_set_init(config)
 
     global im_port_map
-    global im_logger
     global im_config
 
-    im_logger = logging.getLogger("ipmask")
-    im_logger.info("Initializing test set")
     im_port_map = config["port_map"]
     im_config = config
 
@@ -68,7 +63,7 @@
         Use the BSN_SET_IP_MASK vendor command to change the IP mask for the
         given wildcard index
         """
-        im_logger.info("Setting index %d to mask is %s" % (index, mask))
+        logging.info("Setting index %d to mask is %s" % (index, mask))
         m = message.vendor()
         m.vendor = 0x005c16c7
         m.data = struct.pack("!LBBBBL", 0, index, 0, 0, 0, mask)
@@ -99,34 +94,34 @@
                          "IP src must be wildcarded")
         for index in range(0, 64):
             mask = self.bsn_get_ip_mask(index)
-            im_logger.info("Index %d mask is %s" %
+            logging.info("Index %d mask is %s" %
                            (index, scapy.utils.ltoa(mask)))
             self.assertEqual(mask, normal_ip_mask(index), "Unexpected IP mask")
 
         for index in range(0, 64):
             mask = normal_ip_mask(index)
             if mask == 0:
-                im_logger.info("Skipping IP wildcard index %d" % index)
+                logging.info("Skipping IP wildcard index %d" % index)
             else:
-                im_logger.info("Testing IP wildcard index %d" % index)
+                logging.info("Testing IP wildcard index %d" % index)
                 self.check_ip_mask(True, index, mask)
                 self.check_ip_mask(False, index, mask)
 
-        im_logger.info("Setting fancy IP masks")
+        logging.info("Setting fancy IP masks")
         for index in range(0, 64):
             self.bsn_set_ip_mask(index, fancy_ip_mask(index))
         for index in range(0, 64):
             mask = self.bsn_get_ip_mask(index)
-            im_logger.info("Index %d mask is %s" %
+            logging.info("Index %d mask is %s" %
                            (index, scapy.utils.ltoa(mask)))
             self.assertEqual(mask, fancy_ip_mask(index), "Unexpected IP mask")
 
         for index in range(0, 64):
             mask = fancy_ip_mask(index)
             if mask == 0:
-                im_logger.info("Skipping IP wildcard index %d" % index)
+                logging.info("Skipping IP wildcard index %d" % index)
             else:
-                im_logger.info("Testing IP wildcard index %d" % index)
+                logging.info("Testing IP wildcard index %d" % index)
                 self.check_ip_mask(True, index, mask)
                 self.check_ip_mask(False, index, mask)
 
@@ -156,7 +151,7 @@
            pkt1 = simple_tcp_packet(ip_src=ip1)
            pkt2 = simple_tcp_packet(ip_src=ip2)
            pkt3 = simple_tcp_packet(ip_src=ip3)
-           msg = lambda ip: im_logger.info("Testing source IP %s" % ip)
+           msg = lambda ip: logging.info("Testing source IP %s" % ip)
         else:
            wildcards = ((ofp.OFPFW_ALL ^ ofp.OFPFW_DL_TYPE ^ ofp.OFPFW_NW_DST_MASK)
                         | (index << ofp.OFPFW_NW_DST_SHIFT))
@@ -164,9 +159,9 @@
            pkt1 = simple_tcp_packet(ip_dst=ip1)
            pkt2 = simple_tcp_packet(ip_dst=ip2)
            pkt3 = simple_tcp_packet(ip_dst=ip3)
-           msg = lambda ip: im_logger.info("Testing dest IP %s" % ip)
+           msg = lambda ip: logging.info("Testing dest IP %s" % ip)
 
-        rc = delete_all_flows(self.controller, im_logger)
+        rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
         rc = self.controller.message_send(flow_msg_create(
