From 5b8e34678862e0127a2eea5ead53d314d184e7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Thu, 6 Feb 2020 21:43:46 +0100 Subject: [PATCH] added "log" method to userservice model --- server/src/uds/models/user_service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/uds/models/user_service.py b/server/src/uds/models/user_service.py index c1c0d80e..4090bad9 100644 --- a/server/src/uds/models/user_service.py +++ b/server/src/uds/models/user_service.py @@ -492,6 +492,10 @@ class UserService(UUIDModel): # pylint: disable=too-many-public-methods """ return self.deployed_service.service.getType().publicationType is None or self.publication == self.deployed_service.activePublication() + # Utility for logging + def log(self, message: str, level: int = log.INFO) -> None: + log.doLog(self, level, message, log.INTERNAL) + def testServer(self, host, port, timeout=4) -> bool: return self.deployed_service.testServer(host, port, timeout)