From aff56c9069572106fde6bbbeaa5ee865e014844f Mon Sep 17 00:00:00 2001 From: krateng <git.noreply@krateng.ch> Date: Wed, 2 Mar 2022 04:52:04 +0100 Subject: [PATCH] Logging --- maloja/apis/_base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maloja/apis/_base.py b/maloja/apis/_base.py index 58503b4..b312044 100644 --- a/maloja/apis/_base.py +++ b/maloja/apis/_base.py @@ -58,7 +58,7 @@ class APIHandler: def wrapper(self,path:Multi=[],**keys): - log("API request: " + str(path))# + " | Keys: " + str({k:keys.get(k) for k in keys})) + log("{self.__apiname__} API request: " + str(path))# + " | Keys: " + str({k:keys.get(k) for k in keys})) try: response.status,result = self.handle(path,keys) @@ -90,8 +90,8 @@ class APIHandler: def scrobble(self,artiststr,titlestr,time=None,duration=None,album=None): - logmsg = "API receiving scrobble: (API: {api}): ARTISTS: {artiststr}, TRACK: {titlestr}" - log(logmsg.format(api=self.__apiname__,artiststr=artiststr,titlestr=titlestr)) + logmsg = f"API {self.__apiname__} receiving scrobble: ARTISTS: {artiststr}, TRACK: {titlestr}" + log(logmsg) # fixing etc is handled by the main scrobble function try: