mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix logging issues with the controller
This commit is contained in:
5 files changed
+11
-9
No files matched your search
@@ -17,6 +17,7 @@
|
||||
|
||||
|
||||
class ControllerError(Exception):
|
||||
|
||||
def __init__(self, message):
|
||||
super().__init__(message)
|
||||
self._message = message
|
||||
@@ -26,5 +27,3 @@ class ControllerError(Exception):
|
||||
|
||||
def __str__(self):
|
||||
return self._message
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
from ..controller.controller_error import ControllerError
|
||||
from ..config import Config
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ServerError(ControllerError):
|
||||
pass
|
||||
@@ -30,6 +33,7 @@ class Server:
|
||||
"""
|
||||
|
||||
def __init__(self, server_id, protocol="http", host="localhost", port=8000, user=None, password=None):
|
||||
log.info("Create server %s", server_id)
|
||||
self._id = server_id
|
||||
self._protocol = protocol
|
||||
self._host = host
|
||||
@@ -69,5 +73,3 @@ class Server:
|
||||
"connected": self._connected,
|
||||
"version": self._version
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user