diff --git a/src/watchmaker/__init__.py b/src/watchmaker/__init__.py index 153222b9b..120bdf5a3 100644 --- a/src/watchmaker/__init__.py +++ b/src/watchmaker/__init__.py @@ -17,6 +17,7 @@ import watchmaker.utils from watchmaker import static from watchmaker.exceptions import WatchmakerException +from watchmaker.logger import log_system_details from watchmaker.managers.workers import (LinuxWorkersManager, WindowsWorkersManager) from watchmaker.utils import urllib @@ -215,11 +216,12 @@ def __init__(self, arguments): self.log_dir = arguments.pop('log_dir') self.log_level = arguments.pop('log_level') + log_system_details(self.log) + # Get the system params self.system = platform.system().lower() self._set_system_params() - self.log.debug('System Type: %s', self.system) self.log.debug('System Parameters: %s', self.system_params) # All remaining arguments are worker_args diff --git a/src/watchmaker/logger/__init__.py b/src/watchmaker/logger/__init__.py index d1031a2e6..c936fcf16 100644 --- a/src/watchmaker/logger/__init__.py +++ b/src/watchmaker/logger/__init__.py @@ -89,6 +89,18 @@ def make_log_dir(log_dir): os.makedirs(log_dir) +def log_system_details(log): + """Log details about the system Watchmaker is running on.""" + log.info('System OS: %s', platform.system()) + log.info('System Architecture: %s', platform.architecture()) + log.info('System''s Release: %s', platform.release()) + log.info('System''s Release Version: %s', platform.version()) + log.info('Machine Type: %s', platform.machine()) + log.info('Network Name: %s', platform.node()) + log.info('Processor Name: %s', platform.processor()) + log.info('Python Version: %s', platform.python_version()) + + def prepare_logging(log_dir, log_level): """ Prepare the logger for handling messages to a file and/or to stdout.