Previously, a raised `lona.errors.ClientError` was logged two times. Once by
the view runtime, that received the error, and a second time by the general
logging setup of Lona. The first log entry contained the JavaScript traceback,
raised by the browser, the second log entry contained the full Python traceback
from the server side.
LonaWorker_0 ERROR 12:39:31.344648 lona.view_runtime client error raised:
node with id 39 is already cached
LonaRuntimeWorker_0 ERROR 12:39:31.345355 lona.view_runtime Exception raised while running </home/fscherf/devel/lona/test_project/views/view_types/interactive_view.py.InteractiveView object at 0x7f979c06cc10>
Traceback (most recent call last):
File "/home/fscherf/devel/lona/lona/view_runtime.py", line 348, in start
return_value=self.view.handle_request(self.request),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fscherf/devel/lona/test_project/views/view_types/interactive_view.py", line 56, in handle_request
self.sleep(float(interval.value))
File "/home/fscherf/devel/lona/lona/view.py", line 344, in sleep
return self._await_sync(asyncio.sleep(delay, result))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fscherf/devel/lona/lona/view.py", line 109, in _await_sync
).result()
^^^^^^^^
File "/home/fscherf/.pyenv/versions/3.11.4/lib/python3.11/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/fscherf/.pyenv/versions/3.11.4/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/fscherf/devel/lona/lona/view.py", line 104, in await_awaitable
raise cast(StopReason, self._view_runtime.stop_reason)
The second log entry does not contain any meaningful information, and
the Python traceback only contains Lona framework code, never application code.
Thus it only made these errors harder to read.
This patch adds a new rule to `lona.logging.LogFilter` to filter out log
entries containing a `lona.errors.ClientError` traceback.
Signed-off-by: Florian Scherf <mail@florianscherf.de>