diff --git a/moonraker/moonraker.py b/moonraker/moonraker.py index 467c82d..58383b1 100644 --- a/moonraker/moonraker.py +++ b/moonraker/moonraker.py @@ -89,8 +89,10 @@ class Server: self._load_plugins(config) def start(self): + hostname, hostport = self.get_host_info() logging.info( - f"Starting Moonraker on ({self.host}, {self.port})") + f"Starting Moonraker on ({self.host}, {hostport}), " + f"Hostname: {hostname}") self.moonraker_app.listen(self.host, self.port) self.server_running = True self.ioloop.spawn_callback(self._connect_klippy) @@ -156,6 +158,10 @@ class Server: return self.remote_methods[method_name] = cb + def get_host_info(self): + hostname = socket.gethostname() + return hostname, self.port + # ***** Klippy Connection ***** async def _connect_klippy(self): if not self.server_running: