Kitware / wslink

Python/JavaScript library for communicating over WebSocket
https://kitware.github.io/wslink/
BSD 3-Clause "New" or "Revised" License
83 stars 27 forks source link

aiohttp backend needs its own logger #151

Closed banesullivan-kobold closed 1 year ago

banesullivan-kobold commented 1 year ago

https://github.com/Kitware/wslink/blob/9a6243c7029cda26a827590210783b030e49ca01/python/src/wslink/backends/aiohttp/__init__.py#L101

This module is currently using the root logger. It should be using its own logger, e.g.:

import logging
logger = logging.getLogger(__name__)
banesullivan-kobold commented 1 year ago

This results in noisy logs at the root level for PyVista's Jupyter backend which cannot be suppressed without supressing every other package/module in the environment

Screenshot 2023-10-24 at 11 54 02 AM

import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger("wslink").setLevel(logging.WARNING)

import pyvista as pv
pv.Cone().plot()
banesullivan-kobold commented 1 year ago

This needs to be addressed for all modules under wslink.backends.aiohttp

jourdain commented 1 year ago

indeed. Feel free to do a PR.

jourdain commented 1 year ago

:tada: This issue has been resolved in version 1.12.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: