From bbc9d9e7a8e5fbd22eea439abf6ba4752cc85eba Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 11 Dec 2022 20:41:35 +0100 Subject: [PATCH] log names instead of ids for improved transparency --- owrx/source/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/owrx/source/__init__.py b/owrx/source/__init__.py index 9d4c7bb..4568a15 100644 --- a/owrx/source/__init__.py +++ b/owrx/source/__init__.py @@ -230,8 +230,9 @@ class SdrSource(ABC): return [self.getCommandMapper().map(self.getCommandValues())] def activateProfile(self, profile_id): - self.logger.debug("activating profile {0} for {1}".format(profile_id, self.getId())) try: + profile_name = self.getProfiles()[profile_id]["name"] + self.logger.debug("activating profile \"%s\" for \"%s\"", profile_name, self.getName()) self.profileCarousel.switch(profile_id) except KeyError: self.logger.warning("invalid profile %s for sdr %s. ignoring", profile_id, self.getId())