Delgan
Delgan
Hello @BayerSe. What you are observing is an inherent characteristic of the standard `logging` behavior. This is explained in [the official documentation](https://docs.python.org/3/howto/logging.html#loggers). The following paragraph is particularly relevant: > Loggers...
Thank you for this initial implementation. This seems like an excellent solution to compensate for the planned removal of `**kwargs` as a formatting argument. Please allow me not to merge...
Hi. Normally, libraries are not supposed to configure the logger. Handlers should be added exclusively by the end-user, precisely to avoid conflicts and duplication. In your example, these `module1_with_loguru` and...
The problem description is odd: > When using `enqueue=True`, loguru uses `multiprocessing.Queue` which silently drops logs containing unpicklable objects: > > ### Issue [#399](https://github.com/Delgan/loguru/issues/399): C Extension Exceptions > ```python >...
Hi. For starters, let's note two similar tickets for reference: * https://github.com/Delgan/loguru/issues/424 * https://github.com/Delgan/loguru/issues/989 * https://github.com/Delgan/loguru/issues/1167 Your suggestion goes even further by proposing to generate indentation automatically based on the...
Hi. This is a request that comes up from time to time, always with different formatting specificities. However, Loguru deliberately avoids manipulating the logged message for simplicity and consistency. In...
Hi. Thanks for the reproducible example. What happens is that IPython replaces the default `sys.stderr` (`_io.TextIOWrapper`) with their own custom stream object (`prompt_toolkit.patch_stdout.StdoutProxy`) while the interactive terminal started by `IPython.embed()`...
Hi @ddofborg. Have you considered using [`logger.contextualize()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.contextualize)? ```python with logger.contextualize(pid=os.getpid()): log.info("loading account") account_id = load_account() with logger.contextualize(acount=account_id): log.info("computing") compute(account_id) log.info("unloading account") unload(account_id) log.info("done") ``` This is current the closest solution...
Yes, thanks @aparna2198 for sharing an additional workaround. This solution is truly "global", as opposed to my use of `ContextVars`. Note, however, that such an implementation requires a lock mechanism...
Hi @daniel347x. Thank you for your interest in contributing to Loguru. Getting back at your comment at https://github.com/Delgan/loguru/issues/173#issuecomment-243940946, it still seems natural to define a limit to the maximum length...