Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
remove redundant service labels from debug messages
Browse files Browse the repository at this point in the history
remove labels from debug messages denoting which service they belong
to, this is redundant with the use of the logger
  • Loading branch information
mmattioli committed May 12, 2015
1 parent c0ad607 commit 6b3107c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
18 changes: 9 additions & 9 deletions pypxe/dhcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,18 @@ def __init__(self, **server_settings):

# debug info for ProxyDHCP mode
if not self.mode_proxy:
self.logger.debug('DHCP Lease Range: {0} - {1}'.format(self.offer_from, self.offer_to))
self.logger.debug('DHCP Subnet Mask: {0}'.format(self.subnet_mask))
self.logger.debug('DHCP Router: {0}'.format(self.router))
self.logger.debug('DHCP DNS Server: {0}'.format(self.dns_server))
self.logger.debug('DHCP Broadcast Address: {0}'.format(self.broadcast))
self.logger.debug('Lease Range: {0} - {1}'.format(self.offer_from, self.offer_to))
self.logger.debug('Subnet Mask: {0}'.format(self.subnet_mask))
self.logger.debug('Router: {0}'.format(self.router))
self.logger.debug('DNS Server: {0}'.format(self.dns_server))
self.logger.debug('Broadcast Address: {0}'.format(self.broadcast))

if self.static_config:
self.logger.debug('DHCP Using Static Leasing')
self.logger.debug('DHCP Using Static Leasing Whitelist: {0}'.format(self.whitelist))
self.logger.debug('Using Static Leasing')
self.logger.debug('Using Static Leasing Whitelist: {0}'.format(self.whitelist))

self.logger.debug('DHCP File Server IP: {0}'.format(self.file_server))
self.logger.debug('DHCP File Name: {0}'.format(self.file_name))
self.logger.debug('File Server IP: {0}'.format(self.file_server))
self.logger.debug('File Name: {0}'.format(self.file_name))
self.logger.debug('ProxyDHCP Mode: {0}'.format(self.mode_proxy))
self.logger.debug('Using iPXE: {0}'.format(self.ipxe))
self.logger.debug('Using HTTP Server: {0}'.format(self.http))
Expand Down
6 changes: 3 additions & 3 deletions pypxe/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def __init__(self, **server_settings):
os.chroot ('.')

self.logger.debug('NOTICE: HTTP server started in debug mode. HTTP server is using the following:')
self.logger.debug('HTTP Server IP: {0}'.format(self.ip))
self.logger.debug('HTTP Server Port: {0}'.format(self.port))
self.logger.debug('HTTP Network Boot Directory: {0}'.format(self.netboot_directory))
self.logger.debug('Server IP: {0}'.format(self.ip))
self.logger.debug('Server Port: {0}'.format(self.port))
self.logger.debug('Network Boot Directory: {0}'.format(self.netboot_directory))

def handle_request(self, connection, addr):
'''This method handles HTTP request.'''
Expand Down
10 changes: 5 additions & 5 deletions pypxe/nbd/nbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ def __init__(self, **server_settings):
self.logger.setLevel(logging.DEBUG)

self.logger.debug('NOTICE: NBD server started in debug mode. NBD server is using the following:')
self.logger.debug('NBD Server IP: {0}'.format(self.ip))
self.logger.debug('NBD Server Port: {0}'.format(self.port))
self.logger.debug('NBD Block Device: {0}'.format(self.bd))
self.logger.debug('NBD Block Device Writes: {0}'.format(self.write))
self.logger.debug('NBD Block Write Method: {0} ({1})'.format("Copy-On-Write" if self.cow else 'File', 'Memory' if self.in_mem else 'Disk'))
self.logger.debug('Server IP: {0}'.format(self.ip))
self.logger.debug('Server Port: {0}'.format(self.port))
self.logger.debug('Block Device: {0}'.format(self.bd))
self.logger.debug('Block Device Writes: {0}'.format(self.write))
self.logger.debug('Block Write Method: {0} ({1})'.format("Copy-On-Write" if self.cow else 'File', 'Memory' if self.in_mem else 'Disk'))

if self.mode_debug:
self.logger.setLevel(logging.DEBUG)
Expand Down
6 changes: 3 additions & 3 deletions pypxe/tftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ def __init__(self, **server_settings):
self.logger.setLevel(logging.DEBUG)

self.logger.debug('NOTICE: TFTP server started in debug mode. TFTP server is using the following:')
self.logger.debug('TFTP Server IP: {0}'.format(self.ip))
self.logger.debug('TFTP Server Port: {0}'.format(self.port))
self.logger.debug('TFTP Network Boot Directory: {0}'.format(self.netbook_directory))
self.logger.debug('Server IP: {0}'.format(self.ip))
self.logger.debug('Server Port: {0}'.format(self.port))
self.logger.debug('Network Boot Directory: {0}'.format(self.netbook_directory))

self.ongoing = []

Expand Down

0 comments on commit 6b3107c

Please sign in to comment.