Index: trunk/packages/sipb-xen-dhcp/code/dhcpserver.py
===================================================================
--- trunk/packages/sipb-xen-dhcp/code/dhcpserver.py	(revision 1033)
+++ trunk/packages/sipb-xen-dhcp/code/dhcpserver.py	(revision 1034)
@@ -10,8 +10,5 @@
 import IN
 
-import event_logger
-if '__main__' == __name__:
-    event_logger.init("stdout", 'DEBUG', {})
-from event_logger import Log
+import syslog as s
 
 import psycopg2
@@ -51,5 +48,5 @@
             parts = line.split()
             if parts[1] == ipstr:
-                Log.Output(Log.debug, "find_interface found "+str(nic.ip)+" on "+parts[0])
+                s.syslog(s.LOG_DEBUG, "find_interface found "+str(nic.ip)+" on "+parts[0])
                 return parts[0]
         return
@@ -108,5 +105,5 @@
 
     def Discover(self, packet):
-        Log.Output(Log.debug,"dhcp_backend : Discover ")
+        s.syslog(s.LOG_DEBUG, "dhcp_backend : Discover ")
         chaddr = hwmac(packet.GetHardwareAddress())
         nic = self.findNIC(str(chaddr))
@@ -131,5 +128,5 @@
         if ip is not None:
             ip = ipv4(ip)
-            Log.Output(Log.debug,"dhcp_backend : Discover result = "+str(ip))
+            s.syslog(s.LOG_DEBUG,"dhcp_backend : Discover result = "+str(ip))
             packet_parameters = self.getParameters(**options)
 
@@ -142,5 +139,5 @@
         
     def Request(self, packet):
-        Log.Output(Log.debug, "dhcp_backend : Request")
+        s.syslog(s.LOG_DEBUG, "dhcp_backend : Request")
         
         discover = self.Discover(packet)
@@ -153,12 +150,12 @@
 
         if not discover:
-            Log.Output(Log.info,"Unknown MAC address: "+str(chaddr))
+            s.syslog(s.LOG_INFO,"Unknown MAC address: "+str(chaddr))
             return False
         
         if yiaddr!="0.0.0.0" and yiaddr == request :
-            Log.Output(Log.info,"Ack ip "+str(yiaddr)+" for "+str(chaddr))
+            s.syslog(s.LOG_INFO,"Ack ip "+str(yiaddr)+" for "+str(chaddr))
             return True
         else:
-            Log.Output(Log.info,"Requested ip "+str(request)+" not available for "+str(chaddr))
+            s.syslog(s.LOG_INFO,"Requested ip "+str(request)+" not available for "+str(chaddr))
         return False
 
@@ -173,5 +170,5 @@
         pydhcplib.dhcp_network.DhcpServer.__init__(self,"0.0.0.0",options["client_listen_port"],options["server_listen_port"],)
         self.backend = backend
-        Log.Output(Log.debug, "__init__ DhcpServer")
+        s.syslog(s.LOG_DEBUG, "__init__ DhcpServer")
 
     def SendDhcpPacketTo(self, To, packet):
@@ -198,10 +195,10 @@
             agent_ip = ".".join(map(str,giaddr))
             self.SendDhcpPacketTo(agent_ip,packet)
-            Log.Output(Log.debug, "SendPacket to agent : "+agent_ip)
+            s.syslog(s.LOG_DEBUG, "SendPacket to agent : "+agent_ip)
 
         # FIXME: This shouldn't broadcast if it has an IP address to send
         # it to instead. See RFC2131 part 4.1 for full details
         else :
-            Log.Output(Log.debug, "No agent, broadcast packet.")
+            s.syslog(s.LOG_DEBUG, "No agent, broadcast packet.")
             self.SendDhcpPacketTo("255.255.255.255",packet)
             
@@ -213,5 +210,5 @@
         logmsg = "Get DHCPDISCOVER packet from " + hwmac(packet.GetHardwareAddress()).str()
 
-        Log.Output(Log.info, logmsg)
+        s.syslog(s.LOG_INFO, logmsg)
         offer = DhcpPacket()
         offer.CreateDhcpOfferPacketFrom(packet)
@@ -233,13 +230,13 @@
 
         if sid != [0,0,0,0] and ciaddr == [0,0,0,0] :
-            Log.Output(Log.info, "Get DHCPREQUEST_SELECTING_STATE packet")
+            s.syslog(s.LOG_INFO, "Get DHCPREQUEST_SELECTING_STATE packet")
 
         elif sid == [0,0,0,0] and ciaddr == [0,0,0,0] and ip :
-            Log.Output(Log.info, "Get DHCPREQUEST_INITREBOOT_STATE packet")
+            s.syslog(s.LOG_INFO, "Get DHCPREQUEST_INITREBOOT_STATE packet")
 
         elif sid == [0,0,0,0] and ciaddr != [0,0,0,0] and not ip :
-            Log.Output(Log.info,"Get DHCPREQUEST_INITREBOOT_STATE packet")
-
-        else : Log.Output(Log.info,"Get DHCPREQUEST_UNKNOWN_STATE packet : not implemented")
+            s.syslog(s.LOG_INFO,"Get DHCPREQUEST_INITREBOOT_STATE packet")
+
+        else : s.syslog(s.LOG_INFO,"Get DHCPREQUEST_UNKNOWN_STATE packet : not implemented")
 
         if self.backend.Request(packet) : packet.TransformToDhcpAckPacket()
@@ -252,13 +249,13 @@
     # FIXME: These are not yet implemented.
     def HandleDhcpDecline(self, packet):
-        Log.Output(Log.info, "Get DHCPDECLINE packet")
+        s.syslog(s.LOG_INFO, "Get DHCPDECLINE packet")
         self.backend.Decline(packet)
         
     def HandleDhcpRelease(self, packet):
-        Log.Output(Log.info,"Get DHCPRELEASE packet")
+        s.syslog(s.LOG_INFO,"Get DHCPRELEASE packet")
         self.backend.Release(packet)
         
     def HandleDhcpInform(self, packet):
-        Log.Output(Log.info, "Get DHCPINFORM packet")
+        s.syslog(s.LOG_INFO, "Get DHCPINFORM packet")
 
         if self.backend.Request(packet) :
