diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2023-03-18 03:18:48 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2023-03-22 14:08:01 +0100 |
commit | ad088a1a29f6871952ced88032cc94ac3e9a56b8 (patch) | |
tree | c1b059e3707f5f0138378292041ed818a9d9b26d /recording | |
parent | cfd4cb03ec964e461d665c05c75cb3f5363d4a3b (diff) |
Provide explicit name for the recorder log
Rather than providing some values and then composing the final name from
them now the recorder log name is explicitly provided.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'recording')
-rw-r--r-- | recording/src/nextcloud/talk/recording/Service.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/recording/src/nextcloud/talk/recording/Service.py b/recording/src/nextcloud/talk/recording/Service.py index 94d1088e6..ad436d10b 100644 --- a/recording/src/nextcloud/talk/recording/Service.py +++ b/recording/src/nextcloud/talk/recording/Service.py @@ -124,15 +124,14 @@ def newAudioSink(baseSinkName): return moduleIndex, sinkIndex -def recorderLog(backend, token, pipe): +def recorderLog(loggerName, pipe): """ Logs the recorder output. - :param backend: the backend of the call. - :param token: the token of the call. + :param loggerName: the name of the logger. :param pipe: Pipe to the recorder process output. """ - logger = logging.getLogger(f"{__name__}.recorder-{backend}-{token}") + logger = logging.getLogger(loggerName) with pipe: for line in pipe: @@ -254,7 +253,7 @@ class Service: self._process = subprocess.Popen(recorderArgs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) # Log recorder output. - Thread(target=recorderLog, args=[self.backend, self.token, self._process.stdout], daemon=True).start() + Thread(target=recorderLog, args=[f"{__name__}.recorder-{self.backend}-{self.token}", self._process.stdout], daemon=True).start() if self._stopped.is_set(): # Not strictly needed, as if the recorder is started after the |