In a Jupyter notebook, after calling pint.logging.setup(), new log messages always print in the cell where pint.logging.setup() was called, instead of the cell where the log message actually originated. This is not true for loguru out of the box, but seems to be caused by the default configuration used by PINT. I think I've tracked it down to the use of enqueue=True here. If I leave out enqueue=True, I can specify a PINT-like logger configuration without getting this behavior.
In a Jupyter notebook, after calling
pint.logging.setup(), new log messages always print in the cell wherepint.logging.setup()was called, instead of the cell where the log message actually originated. This is not true forloguruout of the box, but seems to be caused by the default configuration used by PINT. I think I've tracked it down to the use ofenqueue=Truehere. If I leave outenqueue=True, I can specify a PINT-like logger configuration without getting this behavior.